]> git.openstreetmap.org Git - nominatim.git/commitdiff
Removed unused variable, fixed connection
authorRobbe Haesendonck <googleit@inuits.eu>
Wed, 27 Sep 2023 07:24:04 +0000 (09:24 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Thu, 7 Dec 2023 08:04:33 +0000 (09:04 +0100)
nominatim/clicmd/setup.py
nominatim/db/connection.py

index 49a9363d59c7c57eea6e4771652f6ead09e76daa..626e3f2a1ba310b9450765243c4afa1cf932d52c 100644 (file)
@@ -105,8 +105,7 @@ class SetupAll:
                                                         rouser=args.config.DATABASE_WEBUSER)
                 return 0
 
-            if not args.prepare_database or \
-                    args.continue_at == 'import-from-file':
+            if args.continue_at == 'import-from-file':
                 # Check if the correct plugins are installed
                 database_import.check_existing_database_plugins(args.config.get_libpq_dsn())
                 LOG.warning('Setting up country tables')
index 51110f54f459987da7227cc586084222ae61bd3c..82801ae7995c9d1e5527baec0d9dd89c85e70e4d 100644 (file)
@@ -179,7 +179,7 @@ class Connection(psycopg2.extensions.connection):
         """ Return True if the hstore extension is loaded in the database.
         """
         with self.cursor() as cur:
-            cur.execute('SELECT extname FROM pg_extension WHERE extname = %s', (extension_name))
+            cur.execute('SELECT extname FROM pg_extension WHERE extname = %s', (extension_name))
             return cur.rowcount > 0