]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/db/connection.py
add new required json library for osm2pgsql
[nominatim.git] / nominatim / db / connection.py
index 44a293d43b7f58dbfd19690525989b69333a9486..77d463d81d8e4dc0522bf1b2702aff0db66f21df 100644 (file)
@@ -189,7 +189,7 @@ def connect(dsn: str) -> ConnectionContext:
     try:
         conn = psycopg2.connect(dsn, connection_factory=Connection)
         ctxmgr = cast(ConnectionContext, contextlib.closing(conn))
-        ctxmgr.connection = cast(Connection, conn)
+        ctxmgr.connection = conn
         return ctxmgr
     except psycopg2.OperationalError as err:
         raise UsageError(f"Cannot connect to database: {err}") from err