From fa271fcc8e4757c1b606bd448320f98577cec852 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Fri, 30 Mar 2018 02:24:30 +0545 Subject: [PATCH] issue #174: select.error interface differs to OSError Only OSError got the magical attribute treatment, select.error still behaves like a tuple. --- mitogen/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mitogen/core.py b/mitogen/core.py index e00f4cd0..beeedd63 100644 --- a/mitogen/core.py +++ b/mitogen/core.py @@ -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