summaryrefslogtreecommitdiff
path: root/tests/test_errcodes.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_errcodes.py')
-rwxr-xr-xtests/test_errcodes.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_errcodes.py b/tests/test_errcodes.py
index accee56..4848a76 100755
--- a/tests/test_errcodes.py
+++ b/tests/test_errcodes.py
@@ -27,7 +27,10 @@ from testutils import unittest, ConnectingTestCase, slow
try:
reload
except NameError:
- from imp import reload
+ try:
+ from importlib import reload
+ except ImportError:
+ from imp import reload
from threading import Thread
from psycopg2 import errorcodes