From a440b9da47d40bbcaad2a64c54825393b43be988 Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Tue, 5 Nov 2024 11:20:59 +0100 Subject: live: fix error report in partition and format Fix error codepath and properly mark the operation as failed. --- src/live/ogOperations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/live/ogOperations.py') diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py index 2ae0104..cee55e5 100644 --- a/src/live/ogOperations.py +++ b/src/live/ogOperations.py @@ -531,7 +531,7 @@ class OgLiveOperations: else: err = mkfs(fs, disk, partition) - if err == -1: + if err != 0: raise OgError(f'Failed to format {part["partition"]} with filesystem {part["filesystem"]}') ret = subprocess.run(['partprobe', f'/dev/{diskname}']) -- cgit v1.2.3-18-g5258