X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/882f496e0a1093239a26cdbf29c9af5c5fe9977c..aa5f27fb91a567b489032a2788debfee38380461:/nominatim/nominatim.py diff --git a/nominatim/nominatim.py b/nominatim/nominatim.py index ac6d23ff..0db0777d 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): @@ -299,7 +304,7 @@ class Indexer(object): else: ready, _, _ = select.select(self.threads, [], []) - assert(False, "Unreachable code") + assert False, "Unreachable code" def nominatim_arg_parser():