Update OutOfDate message to show actual argument.
This commit is contained in:
parent
93eb693bee
commit
2ffe3940e6
2 changed files with 6 additions and 2 deletions
|
@ -166,7 +166,7 @@ class BadDataDirectory(EtiquetteException):
|
|||
|
||||
OUTOFDATE = '''
|
||||
Database is out of date. {existing} should be {new}.
|
||||
Please use utilities\\database_upgrader\\database_upgrader.py
|
||||
Please run utilities\\database_upgrader\\database_upgrader.py "{filepath.absolute_path}"
|
||||
'''.strip()
|
||||
class DatabaseOutOfDate(EtiquetteException):
|
||||
'''
|
||||
|
|
|
@ -1349,7 +1349,11 @@ class PhotoDB(
|
|||
'''
|
||||
existing = self.sql_execute('PRAGMA user_version').fetchone()[0]
|
||||
if existing != constants.DATABASE_VERSION:
|
||||
raise exceptions.DatabaseOutOfDate(existing=existing, new=constants.DATABASE_VERSION)
|
||||
raise exceptions.DatabaseOutOfDate(
|
||||
existing=existing,
|
||||
new=constants.DATABASE_VERSION,
|
||||
filepath=self.database_filepath,
|
||||
)
|
||||
|
||||
def _first_time_setup(self):
|
||||
self.log.debug('Running first-time database setup.')
|
||||
|
|
Loading…
Reference in a new issue