Added a hard exception for when mount information can't be detected
This commit is contained in:
parent
91887bf0b3
commit
6f8b064ec5
1 changed files with 1 additions and 5 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue