Added a hard exception for when mount information can't be detected

This commit is contained in:
Anton Hvornum 2021-11-11 15:26:07 +00:00
parent 91887bf0b3
commit 6f8b064ec5

View file

@ -132,11 +132,7 @@ def get_mount_info(path :Union[pathlib.Path, str], traverse=False, return_real_p
break
if not output:
log(f"Could not get mount information for device path {path}: {output}", fg="yellow", level=logging.WARNING)
if return_real_path:
return {}, None
else:
return {}
raise DiskError(f"Could not get mount information for device path {path}")
output = json.loads(output)
if 'filesystems' in output: