X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/882f496e0a1093239a26cdbf29c9af5c5fe9977c..143fa6e6b5f9f236de18c87c725cfd884ada613e:/nominatim/nominatim.py?ds=sidebyside diff --git a/nominatim/nominatim.py b/nominatim/nominatim.py index ac6d23ff..14643770 100755 --- a/nominatim/nominatim.py +++ b/nominatim/nominatim.py @@ -35,9 +35,14 @@ import select log = logging.getLogger() def make_connection(options, asynchronous=False): - return psycopg2.connect(dbname=options.dbname, user=options.user, - password=options.password, host=options.host, - port=options.port, async_=asynchronous) + params = {'dbname' : options.dbname, + 'user' : options.user, + 'password' : options.password, + 'host' : options.host, + 'port' : options.port, + 'async' : asynchronous} + + return psycopg2.connect(**params) class RankRunner(object):