diff options
Diffstat (limited to 'src/live')
-rw-r--r-- | src/live/ogOperations.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py index 44d8f1b..15e563f 100644 --- a/src/live/ogOperations.py +++ b/src/live/ogOperations.py @@ -429,9 +429,12 @@ class OgLiveOperations: partition = int(part["partition"]) if fs == 'cache': - mkfs('ext4', int(disk), partition, label='CACHE') + err = mkfs('ext4', int(disk), partition, label='CACHE') else: - mkfs(fs, int(disk), partition) + err = mkfs(fs, int(disk), partition) + + if err == -1: + raise OgError(f'Failed to format {part["partition"]} with filesystem {part["filesystem"]}') ret = subprocess.run(['partprobe', f'/dev/{diskname}']) logging.info(f'second partprobe /dev/{diskname} reports {ret.returncode}') |