Function
_get_open_error_message
(source_path: str, error: OSError)
Source from the content-addressed store, hash-verified
| 152 | |
| 153 | |
| 154 | def _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 | |
| 162 | def _get_read_error_message(source_path: str, error: OSError) -> str: |
Tested by
no test coverage detected