summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-11-05 11:20:59 +0100
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-11-05 11:20:59 +0100
commita440b9da47d40bbcaad2a64c54825393b43be988 (patch)
tree5bbd51698648378d0dd79254713b8213e6e742d3 /src
parent64f1f5403e014a944e70187e6eda9a02c08eac3e (diff)
live: fix error report in partition and format
Fix error codepath and properly mark the operation as failed.
Diffstat (limited to 'src')
-rw-r--r--src/live/ogOperations.py2
1 files changed, 1 insertions, 1 deletions
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}'])