diff --git a/scripts/wk/clone/ddrescue.py b/scripts/wk/clone/ddrescue.py index 34dd3e9d..a1178fe1 100644 --- a/scripts/wk/clone/ddrescue.py +++ b/scripts/wk/clone/ddrescue.py @@ -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()