live: fix error report in partition and format

Fix error codepath and properly mark the operation as failed.
master
Alejandro Sirgo Rica 2024-11-05 11:20:59 +01:00
parent 64f1f5403e
commit a440b9da47
1 changed files with 1 additions and 1 deletions

View File

@ -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}'])