diff options
author | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-03-22 10:26:34 +0100 |
---|---|---|
committer | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-03-26 13:23:04 +0100 |
commit | 16dcc9b25b305c81efc975df24cf13a04a30bf47 (patch) | |
tree | 01fd8ac6a37673a9df2caa233e8f3ed78a9d0530 /src/live | |
parent | 97647c32aa2c61107230528d448bfa1e56da0f73 (diff) |
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.
Diffstat (limited to 'src/live')
-rw-r--r-- | src/live/ogOperations.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py index af9bd25..05c6a10 100644 --- a/src/live/ogOperations.py +++ b/src/live/ogOperations.py @@ -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) |