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:
parent
ffdd192397
commit
fa271fcc8e
|
@ -216,9 +216,9 @@ def io_op(func, *args):
|
||||||
return func(*args), False
|
return func(*args), False
|
||||||
except (select.error, OSError), e:
|
except (select.error, OSError), e:
|
||||||
_vv and IOLOG.debug('io_op(%r) -> OSError: %s', func, e)
|
_vv and IOLOG.debug('io_op(%r) -> OSError: %s', func, e)
|
||||||
if e.errno == errno.EINTR:
|
if e[0] == errno.EINTR:
|
||||||
continue
|
continue
|
||||||
if e.errno in (errno.EIO, errno.ECONNRESET, errno.EPIPE):
|
if e[0] in (errno.EIO, errno.ECONNRESET, errno.EPIPE):
|
||||||
return None, True
|
return None, True
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue