summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Kluyver <takowl@gmail.com>2014-06-24 14:35:03 -0700
committerThomas Kluyver <takowl@gmail.com>2014-06-24 14:35:03 -0700
commit033393ad5ee629fff9ba2e4930931d85bac8ad58 (patch)
tree159357d92356dfe552ecb89790c9d6126bf25b2c
parenta21580e775c577843071b83232232b7a604b6e2d (diff)
downloadpexpect-git-033393ad5ee629fff9ba2e4930931d85bac8ad58.tar.gz
Fix up except syntax again
-rw-r--r--pexpect/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pexpect/__init__.py b/pexpect/__init__.py
index a468667..b0800d8 100644
--- a/pexpect/__init__.py
+++ b/pexpect/__init__.py
@@ -727,7 +727,7 @@ class spawn(object):
try:
fd = os.open("/dev/tty", os.O_RDWR | os.O_NOCTTY)
os.close(fd)
- except OSError, err:
+ except OSError as err:
if err.errno != errno.ENXIO:
raise
@@ -739,7 +739,7 @@ class spawn(object):
fd = os.open("/dev/tty", os.O_RDWR | os.O_NOCTTY)
os.close(fd)
raise ExceptionPexpect("OSError of errno.ENXIO should be raised.")
- except OSError, err:
+ except OSError as err:
if err.errno != errno.ENXIO:
raise