summaryrefslogtreecommitdiffstats
path: root/src/utils/disk.py
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-02-14 12:20:46 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2024-02-14 12:28:28 +0100
commit478c4447be20380c5b173f8e150d2373cf6d021b (patch)
tree20a498b81f8dfa0073606388b46161fb2b6983d4 /src/utils/disk.py
parentc1529c5eec2d782a38e07077388e780970788ffe (diff)
src: improve error check in image_create and image_restore
cover more error cases where exceptions need to be raised. check return code in the invoked subprocess. restoreImageCustom has been intentionally left behind, it is unclear what this custom script returns on success and error.
Diffstat (limited to 'src/utils/disk.py')
-rw-r--r--src/utils/disk.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/disk.py b/src/utils/disk.py
index e26983c..1f1fdab 100644
--- a/src/utils/disk.py
+++ b/src/utils/disk.py
@@ -33,4 +33,4 @@ def get_partition_device(disknum, partnum):
if pa.partno == partnum - 1:
return cxt.partition_to_string(pa, fdisk.FDISK_FIELD_DEVICE)
- raise ValueError('No such partition')
+ raise ValueError(f'No such partition with disk index {disknum} and partition index {partnum}')