diff options
author | jquast <contact@jeffquast.com> | 2014-06-03 08:07:25 -0700 |
---|---|---|
committer | jquast <contact@jeffquast.com> | 2014-06-03 08:07:25 -0700 |
commit | cb8ca4ee87ebeba763f1f0893649838c737ba85c (patch) | |
tree | ffa7ca8f0c83ff3dfaf3d66cc9b446a776515848 | |
parent | a9a70103b5ea4a7f9f50073eeb608978d35c5349 (diff) | |
download | pexpect-issue-44-solaris-try-2.tar.gz |
catch termios.error (linux).issue-44-solaris-try-2
For some reason py.test isn't in a terminal. On linux (travis) its
throwing general "error: (25, 'Inappropriate ioctl for device')" which
I'm hoping is termios.error, otherwise we'll have to catch 'Exception'
again.
-rw-r--r-- | pexpect/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pexpect/__init__.py b/pexpect/__init__.py index a88a0e3..621dfee 100644 --- a/pexpect/__init__.py +++ b/pexpect/__init__.py @@ -503,7 +503,7 @@ class spawn(object): fd = sys.__stdin__.fileno() self._INTR = ord(termios.tcgetattr(fd)[6][VINTR]) self._EOF = ord(termios.tcgetattr(fd)[6][VEOF]) - except (ImportError, OSError, IOError): + except (ImportError, OSError, IOError, termios.error): # unless the controlling process is also not a terminal, # such as cron(1). Fall-back to using CEOF and CINTR. try: |