Update OutOfDate message to show actual argument.
This commit is contained in:
parent
d12e66f19c
commit
24f155a40d
2 changed files with 6 additions and 2 deletions
|
@ -17,7 +17,7 @@ class TimesearchException(Exception):
|
|||
|
||||
OUTOFDATE = '''
|
||||
Database is out of date. {current} should be {new}.
|
||||
Please use utilities\\database_upgrader.py
|
||||
Please run utilities\\database_upgrader.py "{filepath.absolute_path}"
|
||||
'''.strip()
|
||||
class DatabaseOutOfDate(TimesearchException):
|
||||
'''
|
||||
|
|
|
@ -219,7 +219,11 @@ class TSDB:
|
|||
'''
|
||||
existing = self.cur.execute('PRAGMA user_version').fetchone()[0]
|
||||
if existing != DATABASE_VERSION:
|
||||
raise exceptions.DatabaseOutOfDate(current=existing, new=DATABASE_VERSION)
|
||||
raise exceptions.DatabaseOutOfDate(
|
||||
current=existing,
|
||||
new=DATABASE_VERSION,
|
||||
filepath=self.filepath,
|
||||
)
|
||||
|
||||
def _first_time_setup(self):
|
||||
self.sql.executescript(DB_INIT)
|
||||
|
|
Loading…
Reference in a new issue