X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/a1f0fc1a10db6fe3b8c329b3899b211ea0b62079..0da481f207b1aabc5943ea4ab99914d9b1f50b82:/nominatim/db/async_connection.py diff --git a/nominatim/db/async_connection.py b/nominatim/db/async_connection.py index c5d6872b..361fe075 100644 --- a/nominatim/db/async_connection.py +++ b/nominatim/db/async_connection.py @@ -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()