diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/utils/fs.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/utils/fs.py b/src/utils/fs.py index 4fd431e..77f8b75 100644 --- a/src/utils/fs.py +++ b/src/utils/fs.py @@ -207,9 +207,11 @@ def _reduce_resize2fs(partdev): cmd = shlex.split(f'resize2fs -fpM {partdev}') with open('/tmp/command.log', 'ab', 0) as logfile: proc = subprocess.run(cmd, stdout=logfile, stderr=STDOUT) - ret = proc.returncode + if proc.returncode != 0: + logging.error('failed to resize {partdev} with ext4') + return -1 - return 0 if ret == 0 else -1 + return 0 def _reduce_ntfsresize(partdev): |