From 16dcc9b25b305c81efc975df24cf13a04a30bf47 Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Fri, 22 Mar 2024 10:26:34 +0100 Subject: 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. --- src/live/ogOperations.py | 4 ++-- 1 file 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) -- cgit v1.2.3-18-g5258