summaryrefslogtreecommitdiff
path: root/tests/test_ctrl_chars.py
diff options
context:
space:
mode:
authorThomas Kluyver <takowl@gmail.com>2013-09-17 15:52:47 -0700
committerThomas Kluyver <takowl@gmail.com>2013-09-17 15:52:47 -0700
commit5cdccd73558298331d580792f48986b24b8bc3c9 (patch)
treeea18f463327a5376777c015c392bd66c4ef0141f /tests/test_ctrl_chars.py
parent98012748c31623b0c99103ebb79d111ee0c8317c (diff)
downloadpexpect-git-5cdccd73558298331d580792f48986b24b8bc3c9.tar.gz
Use new style except statements in tests
Diffstat (limited to 'tests/test_ctrl_chars.py')
-rwxr-xr-xtests/test_ctrl_chars.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_ctrl_chars.py b/tests/test_ctrl_chars.py
index c679609..77b6099 100755
--- a/tests/test_ctrl_chars.py
+++ b/tests/test_ctrl_chars.py
@@ -45,7 +45,7 @@ class TestCtrlChars(PexpectTestCase.PexpectTestCase):
# child.send(unicode('%d'%i, encoding='utf-8'))
child.send(chr(i))
child.expect ('%d\r\n' % i)
- except Exception, e:
+ except Exception as e:
msg = "Did not echo character value: " + str(i) + "\n"
msg = msg + str(e)
self.fail(msg)
@@ -55,7 +55,7 @@ class TestCtrlChars(PexpectTestCase.PexpectTestCase):
child = pexpect.spawn('python getch.py')
child.sendintr()
child.expect ('3\r\n')
- except Exception, e:
+ except Exception as e:
msg = "Did not echo character value: 3\n"
msg = msg + str(e)
self.fail(msg)