diff --git a/openlp/core/ui/icons.py b/openlp/core/ui/icons.py index 70f1cadce..1b7dfd130 100644 --- a/openlp/core/ui/icons.py +++ b/openlp/core/ui/icons.py @@ -192,10 +192,10 @@ class UiIcons(metaclass=Singleton): else: setattr(self, key, qta.icon(icon)) except Exception: - log.exception('Unexpected error for icon: {icon}'.format(icon=icon)) + log.exception(f'Unexpected error for icon: {icon}') setattr(self, key, qta.icon('fa.exclamation-circle', color='red')) except Exception: - log.exception('Unexpected error for icon: {icon}'.format(icon=icon)) + log.exception(f'Unexpected error for icon with key: {key}') setattr(self, key, qta.icon('fa.exclamation-circle', color='red')) @staticmethod diff --git a/openlp/plugins/bibles/lib/db.py b/openlp/plugins/bibles/lib/db.py index cb56b3b85..032a26fc8 100644 --- a/openlp/plugins/bibles/lib/db.py +++ b/openlp/plugins/bibles/lib/db.py @@ -330,7 +330,6 @@ class BibleDB(Manager): if not book_list: book_list = books return [value['id'] for value in book_list if self.get_book_by_book_ref_id(value['id'])] - return [] def get_verses(self, reference_list, show_error=True): """ diff --git a/openlp/plugins/songs/lib/importers/worshipcenterpro.py b/openlp/plugins/songs/lib/importers/worshipcenterpro.py index d167984fe..17a1776f3 100644 --- a/openlp/plugins/songs/lib/importers/worshipcenterpro.py +++ b/openlp/plugins/songs/lib/importers/worshipcenterpro.py @@ -64,10 +64,10 @@ class WorshipCenterProImport(SongImport): records = cursor.fetchall() songs = {} for record in records: - id = record.ID - if id not in songs: - songs[id] = {} - songs[id][record.Field] = record.Value + record_id = record.ID + if record_id not in songs: + songs[record_id] = {} + songs[record_id][record.Field] = record.Value self.import_wizard.progress_bar.setMaximum(len(songs)) for song in songs: if self.stop_import_flag: