diff options
author | Scott Maxwell <scott@codecobblers.com> | 2013-11-19 08:06:35 -0800 |
---|---|---|
committer | Scott Maxwell <scott@codecobblers.com> | 2013-11-19 08:06:35 -0800 |
commit | 25dd096da065b1bc2f35c1a62d8a7055b022818b (patch) | |
tree | 94e87015ebcb83660452c79093e1ac407e360306 /tests/test_transport.py | |
parent | 3ce336c88b7bfbfad03fab17bff8cb3c3a77176c (diff) |
Change all exceptions to modern format (not Py2.5 compatible)
Diffstat (limited to 'tests/test_transport.py')
-rw-r--r-- | tests/test_transport.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/test_transport.py b/tests/test_transport.py index 397b00ca..6f6843ba 100644 --- a/tests/test_transport.py +++ b/tests/test_transport.py @@ -302,9 +302,8 @@ class TransportTest(ParamikoTest): try: chan = self.tc.open_channel('bogus') self.fail('expected exception') - except ChannelException: - x = sys.exc_info()[1] - self.assertTrue(x.code == OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED) + except ChannelException as e: + self.assertTrue(e.code == OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED) def test_9_exit_status(self): """ |