MCPcopy Create free account
hub / github.com/PabloLec/RecoverPy / _get_open_error_message

Function _get_open_error_message

recoverpy/lib/storage/byte_range_reader.py:154–159  ·  view source on GitHub ↗
(source_path: str, error: OSError)

Source from the content-addressed store, hash-verified

152
153
154def _get_open_error_message(source_path: str, error: OSError) -> str:
155 if error.errno == errno.EIO:
156 return f"Cannot open device {source_path} (I/O error)."
157 if Path(source_path).exists():
158 return f"Cannot access {source_path}."
159 return f"Source {source_path} does not exist."
160
161
162def _get_read_error_message(source_path: str, error: OSError) -> str:

Callers 1

_open_sourceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected