[elbe-devel] [PATCH 2/8] elbepack: hdimg.py: adding exception handling
Eduard Krein
eduard.krein at linutronix.de
Thu Mar 28 14:41:03 CET 2024
Adding exception handling to check if directories can
be created on build target.
Signed-off-by: Eduard Krein <eduard.krein at linutronix.de>
---
elbepack/hdimg.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/elbepack/hdimg.py b/elbepack/hdimg.py
index 1f1e9357..0a83fa5c 100644
--- a/elbepack/hdimg.py
+++ b/elbepack/hdimg.py
@@ -363,7 +363,9 @@ def create_label(disk, part, ppart, fslabel, target, grub):
do(
f'cp -a "{os.path.join(target, "filesystems", entry.id)}/." '
f'"{mount_path}/"',
- allow_fail=True)
+ allow_fail=False)
+ except Exception as E:
+ logging.error('Filesystem copy command failed: %s', E)
finally:
do(f'umount {loopdev}')
finally:
--
2.39.2
More information about the elbe-devel
mailing list