Changed: DB Params

This commit is contained in:
DerGrumpf 2025-03-10 11:46:31 +01:00
parent 6a23a47ed2
commit a56584704b
2 changed files with 3 additions and 1 deletions

View File

@ -34,6 +34,8 @@ groups = {
print(df)
#init_db('WiSe_24_25.db')
name = getpass.getuser()
name = f'db_{name}'
print(name)
create_database(name)
init_postgres(name, 'postgres.cyperpunk.de', 'dergrumpf', '1P2h3i4lon$%', 5432)
db.drop_tables(tables)

View File

@ -96,7 +96,7 @@ def create_database(name: str) -> None:
query = sql.SQL(f'CREATE DATABASE {name}')
try:
cur.execute(query)
except psycopg2.errors.DuplicateDatabase:
except psycopg2.errors.DuplicateDatabase as e:
pass
con.close()