issue #174: select.error interface differs to OSError

Only OSError got the magical attribute treatment, select.error still
behaves like a tuple.
This commit is contained in:
David Wilson 2018-03-30 02:24:30 +05:45
parent ffdd192397
commit fa271fcc8e
1 changed files with 2 additions and 2 deletions

View File

@ -216,9 +216,9 @@ def io_op(func, *args):
return func(*args), False
except (select.error, OSError), e:
_vv and IOLOG.debug('io_op(%r) -> OSError: %s', func, e)
if e.errno == errno.EINTR:
if e[0] == errno.EINTR:
continue
if e.errno in (errno.EIO, errno.ECONNRESET, errno.EPIPE):
if e[0] in (errno.EIO, errno.ECONNRESET, errno.EPIPE):
return None, True
raise