Еще один мелкий фикс, траблы были, если пароль от базы неверный.
This commit is contained in:
parent
e36915a365
commit
e252ae0cb8
@ -34,14 +34,15 @@ class Updater:
|
||||
|
||||
@classmethod
|
||||
def get_current_fias_version(cls):
|
||||
db = DBImpl(psycopg2, db_conf)
|
||||
try:
|
||||
db = DBImpl(psycopg2, db_conf)
|
||||
rows = db.get_rows('SELECT version FROM "CONFIG" WHERE id=0', True)
|
||||
assert len(rows) > 0, "Cannot get a version"
|
||||
return rows[0]['version']
|
||||
except:
|
||||
return 0
|
||||
finally:
|
||||
if db:
|
||||
db.close()
|
||||
|
||||
@classmethod
|
||||
|
Loading…
x
Reference in New Issue
Block a user