Code cleanup

This commit is contained in:
Dirk Müller
2024-05-16 15:47:45 +02:00
parent f5ffc83a69
commit 39fde7744a
8 changed files with 5 additions and 12 deletions

View File

@@ -26,11 +26,10 @@ class DB:
def schema_version(self):
# create a cursor
with self.conn.cursor() as cur:
# execute a statement
try:
cur.execute("SELECT MAX(version) from scheme")
except psycopg.errors.UndefinedTable as error:
except psycopg.errors.UndefinedTable:
cur.close()
self.close()
self.connect()