]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/db/async_connection.py
use more generic ImportError to check for module
[nominatim.git] / nominatim / db / async_connection.py
index c5d6872bf0790abfaa10f7b07d2567ba0913663d..361fe0757365c40db30eb4b3e9246ed3564e39ad 100644 (file)
@@ -14,7 +14,7 @@ from psycopg2.extras import wait_select
 try:
     import psycopg2.errors # pylint: disable=no-name-in-module,import-error
     __has_psycopg2_errors__ = True
-except ModuleNotFoundError:
+except ImportError:
     __has_psycopg2_errors__ = False
 
 LOG = logging.getLogger()