MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / from_io_error

Method from_io_error

sdk-python/src/graphlite_sdk/error.py:72–76  ·  view source on GitHub ↗

Create IoError from Python OSError (IOError in Python 3)

(cls, error: OSError)

Source from the content-addressed store, hash-verified

70
71 @classmethod
72 def from_io_error(cls, error: OSError) -> "IoError":
73 """Create IoError from Python OSError (IOError in Python 3)"""
74 filename = getattr(error, 'filename', None) or ''
75 strerror = getattr(error, 'strerror', None) or str(error)
76 return cls(f"{strerror}: {filename}" if filename else strerror)
77
78
79# ============================================================================

Callers 1

from_io_errorFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected