PYTHON-3864 add types to socket_checker.py (#1323)
This commit is contained in:
parent
efcbfbef8c
commit
e4f1a35fd8
@ -25,7 +25,7 @@ _HAVE_POLL = hasattr(select, "poll") and not sys.platform.startswith("java")
|
||||
_SelectError = getattr(select, "error", OSError)
|
||||
|
||||
|
||||
def _errno_from_exception(exc):
|
||||
def _errno_from_exception(exc: BaseException) -> Optional[int]:
|
||||
if hasattr(exc, "errno"):
|
||||
return exc.errno
|
||||
if exc.args:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user