Code cleanup
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user