diff options
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/fs.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/utils/fs.py b/src/utils/fs.py index 651801c..4fd431e 100644 --- a/src/utils/fs.py +++ b/src/utils/fs.py @@ -260,7 +260,10 @@ def _reduce_ntfsresize(partdev): if new_size < size: cmd_resize = shlex.split(f'ntfsresize -fs {new_size:.0f} {partdev}') with open('/tmp/command.log', 'ab', 0) as logfile: - subprocess.run(cmd_resize, input='y', stderr=STDOUT, encoding='utf-8') + proc_resize = subprocess.run(cmd_resize, input='y', stderr=STDOUT, encoding='utf-8') + if proc_resize.returncode != 0: + logging.error(f'ntfsresize on {partdev} with {new_size:.0f} failed with {proc_resize.returncode}') + return -1 return 0 |