From 7ee7ef8846cb32af609d9facafee5d84e0bdfbcc Mon Sep 17 00:00:00 2001 From: Olli Suutari Date: Tue, 4 Oct 2016 16:07:53 +0300 Subject: [PATCH] - Not sure why the db bug is fixed in this branch --- openlp/core/lib/db.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/openlp/core/lib/db.py b/openlp/core/lib/db.py index 4bcc3597b..858dbcc06 100644 --- a/openlp/core/lib/db.py +++ b/openlp/core/lib/db.py @@ -75,24 +75,20 @@ def get_db_path(plugin_name, db_file_name=None): name=db_file_name) -def handle_db_error(plugin_name, db_file_name): +def handle_db_error(self, plugin_name, db_file_name): """ Log and report to the user that a database cannot be loaded + :param self: :param plugin_name: Name of plugin :param db_file_name: File name of database :return: None """ - try: - db_path = get_db_path(plugin_name, db_file_name) - log.exception('Error loading database: {db}'.format(db=db_path)) - critical_error_message_box(translate('OpenLP.Manager', 'Database Error'), - translate('OpenLP.Manager', - 'OpenLP cannot load your database.\n\nDatabase: {db}').format(db=db_path)) - # If the path (Eg. C:/ or D:/) does not exists in the system, return. - # In this case def load in advancedtab.py will handle the missing database. - except FileNotFoundError: - return + db_path = get_db_path(plugin_name, db_file_name) + log.exception('Error loading database: {db}'.format(db=db_path)) + critical_error_message_box(translate('OpenLP.Manager', 'Database Error'), + translate('OpenLP.Manager', + 'OpenLP cannot load your database.\n\nDatabase: {db}').format(db=db_path)) def init_url(plugin_name, db_file_name=None):