Remove dead code from fast syscall wrapper.
This can be done because `select.error` for Python 3.3+ doesn't have an `.args` attribute and instead uses `.errno` like `OSError` and friends.
@@ -10,8 +10,8 @@ import math
import select
import socket
import sys
-from collections import namedtuple, Mapping
import time
+from collections import namedtuple, Mapping
try:
monotonic = time.monotonic
@@ -65,8 +65,6 @@ if sys.version_info >= (3, 5):
errcode = None
if hasattr(e, "errno"):
errcode = e.errno
- elif hasattr(e, "args"):
- errcode = e.args[0]
raise SelectorError(errcode)
else:
def _syscall_wrapper(func, recalc_timeout, *args, **kwargs):
@@ -102,6 +100,8 @@ else:
errcode = None
if hasattr(e, "errno"):
errcode = e.errno
+ elif hasattr(e, "args"):
+ errcode = e.args[0]
# Also test for the Windows equivalent of EINTR.
is_interrupt = (errcode == errno.EINTR or (hasattr(errno, "WSAEINTR") and
