From 5148d3932dca38653bdce472dbe61a970db9f2c6 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Sat, 16 Mar 2019 07:59:19 -0700 Subject: [PATCH] Remove unused import in test_errcodes `reload()` is a builtin function in Python 2.7 and `importlib.reload()` is available on 3.4+. The fallback to `imp.reload()` is never used. --- tests/test_errcodes.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/test_errcodes.py b/tests/test_errcodes.py index c510f720..dbb47bab 100755 --- a/tests/test_errcodes.py +++ b/tests/test_errcodes.py @@ -26,12 +26,11 @@ import unittest from .testutils import ConnectingTestCase, slow, reload try: + # Python 2.7 reload except NameError: - try: - from importlib import reload - except ImportError: - from imp import reload + # Python 3 + from importlib import reload from threading import Thread from psycopg2 import errorcodes