[elbe-devel] [PATCH 2/3] elbepack: hdimg: don't ignore errors during UBI creation
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Mon Dec 16 13:35:36 CET 2024
Silently ignoring errors prevents the user from seeing and mitigating
them. Instead add an error log which will be shown to the user but still
lets the build continue.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/hdimg.py | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/elbepack/hdimg.py b/elbepack/hdimg.py
index e4dbe5c23c43bf95d0558cafe94ed32344942a41..1b30bf25cbb465d9331f060bf18636edfa4bedce 100644
--- a/elbepack/hdimg.py
+++ b/elbepack/hdimg.py
@@ -51,9 +51,8 @@ def mkfs_mtd(mtd, fslabel, target):
fslabel[label].mkfsopt])
# only append the ubifs file if creation didn't fail
img_files.append(f'{label}.ubifs')
- except subprocess.CalledProcessError:
- # continue creating further ubifs filesystems
- pass
+ except subprocess.CalledProcessError as e:
+ logging.error('mkfs.ubifs failed: %s', e, exc_info=e)
return img_files
@@ -121,9 +120,8 @@ def build_image_mtd(mtd, target):
# only add file to list if ubinize command was successful
img_files.append(mtd.text('name'))
- except subprocess.CalledProcessError:
- # continue with generating further images
- pass
+ except subprocess.CalledProcessError as e:
+ logging.error('ubinize failed: %s', e, exc_info=e)
return img_files
--
2.47.1
More information about the elbe-devel
mailing list