mirror of https://git.48k.eu/ogclient
live: improve logging in image_create
Log the whole context of the error when an exception happens. The previous exception handling was hidding important information about the cause of the error.master
parent
97647c32aa
commit
16dcc9b25b
|
@ -483,9 +483,9 @@ class OgLiveOperations:
|
|||
raise RuntimeError(f'Cannot access partclone image file {image_path}')
|
||||
|
||||
image_info = ogGetImageInfo(image_path)
|
||||
except:
|
||||
except Exception as e:
|
||||
self._restartBrowser(self._url)
|
||||
raise RuntimeError(f'Error: Cannot create image for {fstype} filesystem in device {padev}')
|
||||
raise RuntimeError(f'Failed to create image for {fstype} filesystem in device {padev}: {e}') from e
|
||||
|
||||
try:
|
||||
st = os.stat(image_path)
|
||||
|
|
Loading…
Reference in New Issue