forked from hans/Nominatim
Removed unused variable, fixed connection
This commit is contained in:
committed by
Sarah Hoffmann
parent
d231ff60ed
commit
ba6cdd875d
@@ -105,8 +105,7 @@ class SetupAll:
|
|||||||
rouser=args.config.DATABASE_WEBUSER)
|
rouser=args.config.DATABASE_WEBUSER)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
if not args.prepare_database or \
|
if args.continue_at == 'import-from-file':
|
||||||
args.continue_at == 'import-from-file':
|
|
||||||
# Check if the correct plugins are installed
|
# Check if the correct plugins are installed
|
||||||
database_import.check_existing_database_plugins(args.config.get_libpq_dsn())
|
database_import.check_existing_database_plugins(args.config.get_libpq_dsn())
|
||||||
LOG.warning('Setting up country tables')
|
LOG.warning('Setting up country tables')
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ class Connection(psycopg2.extensions.connection):
|
|||||||
""" Return True if the hstore extension is loaded in the database.
|
""" Return True if the hstore extension is loaded in the database.
|
||||||
"""
|
"""
|
||||||
with self.cursor() as cur:
|
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
|
return cur.rowcount > 0
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user