Refactor wk.clone.ddrescue.get_object()
This commit is contained in:
parent
2cce572acf
commit
f50ea711e6
1 changed files with 2 additions and 2 deletions
|
|
@ -1686,14 +1686,14 @@ def get_fstype_macos(path) -> str:
|
|||
return fstype
|
||||
|
||||
|
||||
def get_object(path) -> hw_disk.Disk | None | pathlib.Path:
|
||||
def get_object(path) -> hw_disk.Disk | pathlib.Path:
|
||||
"""Get object based on path, returns obj."""
|
||||
# TODO: Refactor to avoid returning None
|
||||
obj = None
|
||||
|
||||
# Bail early
|
||||
if not path:
|
||||
return obj
|
||||
raise FileNotFoundError(f'Path provided does not exist: {path}')
|
||||
|
||||
# Check path
|
||||
path = pathlib.Path(path).resolve()
|
||||
|
|
|
|||
Loading…
Reference in a new issue