summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-03-22 10:26:34 +0100
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-03-26 13:23:04 +0100
commit16dcc9b25b305c81efc975df24cf13a04a30bf47 (patch)
tree01fd8ac6a37673a9df2caa233e8f3ed78a9d0530
parent97647c32aa2c61107230528d448bfa1e56da0f73 (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.
-rw-r--r--src/live/ogOperations.py4
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)