Added a hard exception for when mount information can't be detected
This commit is contained in:
parent
91887bf0b3
commit
6f8b064ec5
|
|
@ -132,11 +132,7 @@ def get_mount_info(path :Union[pathlib.Path, str], traverse=False, return_real_p
|
||||||
break
|
break
|
||||||
|
|
||||||
if not output:
|
if not output:
|
||||||
log(f"Could not get mount information for device path {path}: {output}", fg="yellow", level=logging.WARNING)
|
raise DiskError(f"Could not get mount information for device path {path}")
|
||||||
if return_real_path:
|
|
||||||
return {}, None
|
|
||||||
else:
|
|
||||||
return {}
|
|
||||||
|
|
||||||
output = json.loads(output)
|
output = json.loads(output)
|
||||||
if 'filesystems' in output:
|
if 'filesystems' in output:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue