]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/nominatim.py
remove Ubuntu 16 installation instructions
[nominatim.git] / nominatim / nominatim.py
index ac6d23ffb070c41744e178b6c0e14124d2ef5f9f..0db0777dc17d20b87413a2bf55d08432dc55de24 100755 (executable)
@@ -35,9 +35,14 @@ import select
 log = logging.getLogger()
 
 def make_connection(options, asynchronous=False):
 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):
 
 
 class RankRunner(object):
@@ -299,7 +304,7 @@ class Indexer(object):
             else:
                 ready, _, _ = select.select(self.threads, [], [])
 
             else:
                 ready, _, _ = select.select(self.threads, [], [])
 
-        assert(False, "Unreachable code")
+        assert False, "Unreachable code"
 
 
 def nominatim_arg_parser():
 
 
 def nominatim_arg_parser():