summaryrefslogtreecommitdiff
path: root/tests/test_async.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2017-11-20 20:00:35 -0800
committerJon Dufresne <jon.dufresne@gmail.com>2017-11-20 20:00:35 -0800
commit390e43fcb191d1b52ca747e2b71f938f9df52c95 (patch)
treef8c6259410ddf8087fba730faacc906b09878106 /tests/test_async.py
parent7a2dd85caa7553d163f6579eb513a370ef069a0e (diff)
downloadpsycopg2-390e43fcb191d1b52ca747e2b71f938f9df52c95.tar.gz
Use modern except syntax throughout project
The syntax "except Exception, exc:" is deprecated. All Python versions supported by psycopg2 support the newer, modern syntax. Forward compatible with future Python versions.
Diffstat (limited to 'tests/test_async.py')
-rwxr-xr-xtests/test_async.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_async.py b/tests/test_async.py
index 0a386d3..4eb5e6a 100755
--- a/tests/test_async.py
+++ b/tests/test_async.py
@@ -444,7 +444,7 @@ class AsyncTests(ConnectingTestCase):
try:
cnn = psycopg2.connect('dbname=thisdatabasedoesntexist', async_=True)
self.wait(cnn)
- except psycopg2.Error, e:
+ except psycopg2.Error as e:
self.assertNotEqual(str(e), "asynchronous connection failed",
"connection error reason lost")
else: