summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Ho <aho@purestorage.com>2013-12-30 21:44:06 -0800
committerAlex Ho <aho@purestorage.com>2013-12-30 21:44:06 -0800
commitefa531aa2364f2e4edad8ac646141bedf6b5b97e (patch)
tree1a3f2aefafada1c8041e7e725422e1a87b499eff
parent6c88ef71a3fd9ffa1a7fd4f23c857031506e5161 (diff)
downloadpexpect-efa531aa2364f2e4edad8ac646141bedf6b5b97e.tar.gz
Correct handle when select in spawn returns with an error (e.g. SIGWINCH)
-rw-r--r--pexpect/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pexpect/__init__.py b/pexpect/__init__.py
index ed5e1e4..ff03532 100644
--- a/pexpect/__init__.py
+++ b/pexpect/__init__.py
@@ -1679,7 +1679,7 @@ class spawn(object):
return select.select(iwtd, owtd, ewtd, timeout)
except select.error:
err = sys.exc_info()[1]
- if err[0] == errno.EINTR:
+ if err.errno == errno.EINTR:
# if we loop back we have to subtract the
# amount of time we already waited.
if timeout is not None: