Removed unused variable, fixed connection

This commit is contained in:
Robbe Haesendonck
2023-09-27 09:24:04 +02:00
committed by Sarah Hoffmann
parent d231ff60ed
commit ba6cdd875d
2 changed files with 2 additions and 3 deletions

View 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')

View 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