MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / _errno_from_exception

Function _errno_from_exception

pymongo/socket_checker.py:26–31  ·  view source on GitHub ↗
(exc: BaseException)

Source from the content-addressed store, hash-verified

24
25
26def _errno_from_exception(exc: BaseException) -> Optional[int]:
27 if hasattr(exc, "errno"):
28 return cast(int, exc.errno)
29 if exc.args:
30 return cast(int, exc.args[0])
31 return None
32
33
34class SocketChecker:

Callers 3

sendallMethod · 0.90
receive_dataFunction · 0.90
selectMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected