Fix exit code handling of e2fsck
This commit is contained in:
parent
c0f7a4ba63
commit
acf59d35e8
1 changed files with 3 additions and 1 deletions
4
image.py
4
image.py
|
@ -17,7 +17,9 @@ def resize_fs(image_path: str, shrink: bool = False):
|
|||
'-fy',
|
||||
image_path,
|
||||
])
|
||||
if result.returncode != 0:
|
||||
# https://man7.org/linux/man-pages/man8/e2fsck.8.html#EXIT_CODE
|
||||
if result.returncode > 2:
|
||||
print(result.returncode)
|
||||
msg = f'Failed to e2fsck {image_path}'
|
||||
if shrink:
|
||||
raise Exception(msg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue