Skip to content

Commit

Permalink
catch termios.error (linux).
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jquast committed Jun 3, 2014
1 parent a9a7010 commit cb8ca4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pexpect/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ def __init__(self, command, args=[], timeout=30, maxread=2000,
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:
Expand Down

0 comments on commit cb8ca4e

Please sign in to comment.