From 5d000f87c34f86dd2e131d032b2825601d8cf0ba Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Wed, 1 Jul 2020 15:59:49 -0700 Subject: [PATCH] Fix DatabaseOutOfDate exception using wrong variable names. --- ycdl/exceptions.py | 6 +++++- ycdl/ycdldb.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ycdl/exceptions.py b/ycdl/exceptions.py index 527dd47..c017755 100644 --- a/ycdl/exceptions.py +++ b/ycdl/exceptions.py @@ -64,5 +64,9 @@ class BadTable(BadSQL): # GENERAL ERRORS +OUTOFDATE = ''' +Database is out of date. {existing} should be {new}. +Please run utilities\\database_upgrader\\database_upgrader.py "{filepath.absolute_path}" +'''.strip() class DatabaseOutOfDate(YCDLException): - error_message = 'Database is out-of-date. {current} should be {new}.' + error_message = OUTOFDATE diff --git a/ycdl/ycdldb.py b/ycdl/ycdldb.py index 557d892..428389b 100644 --- a/ycdl/ycdldb.py +++ b/ycdl/ycdldb.py @@ -413,7 +413,7 @@ class YCDLDB( raise exceptions.DatabaseOutOfDate( existing=existing, new=constants.DATABASE_VERSION, - filepath=self.database_filepath, + filepath=self.data_directory, ) def _first_time_setup(self):