From acf59d35e8281ec2e6bcb273eb295802c9ce8c04 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Fri, 1 Oct 2021 12:32:44 +0200 Subject: [PATCH] Fix exit code handling of e2fsck --- image.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/image.py b/image.py index e925ed8..65568c4 100644 --- a/image.py +++ b/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)