forked from openlp/openlp
Merge branch 'random-cleanups-3' into 'master'
Random cleanups See merge request openlp/openlp!371
This commit is contained in:
commit
b9f27a5252
@ -192,10 +192,10 @@ class UiIcons(metaclass=Singleton):
|
|||||||
else:
|
else:
|
||||||
setattr(self, key, qta.icon(icon))
|
setattr(self, key, qta.icon(icon))
|
||||||
except Exception:
|
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'))
|
setattr(self, key, qta.icon('fa.exclamation-circle', color='red'))
|
||||||
except Exception:
|
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'))
|
setattr(self, key, qta.icon('fa.exclamation-circle', color='red'))
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -330,7 +330,6 @@ class BibleDB(Manager):
|
|||||||
if not book_list:
|
if not book_list:
|
||||||
book_list = books
|
book_list = books
|
||||||
return [value['id'] for value in book_list if self.get_book_by_book_ref_id(value['id'])]
|
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):
|
def get_verses(self, reference_list, show_error=True):
|
||||||
"""
|
"""
|
||||||
|
@ -64,10 +64,10 @@ class WorshipCenterProImport(SongImport):
|
|||||||
records = cursor.fetchall()
|
records = cursor.fetchall()
|
||||||
songs = {}
|
songs = {}
|
||||||
for record in records:
|
for record in records:
|
||||||
id = record.ID
|
record_id = record.ID
|
||||||
if id not in songs:
|
if record_id not in songs:
|
||||||
songs[id] = {}
|
songs[record_id] = {}
|
||||||
songs[id][record.Field] = record.Value
|
songs[record_id][record.Field] = record.Value
|
||||||
self.import_wizard.progress_bar.setMaximum(len(songs))
|
self.import_wizard.progress_bar.setMaximum(len(songs))
|
||||||
for song in songs:
|
for song in songs:
|
||||||
if self.stop_import_flag:
|
if self.stop_import_flag:
|
||||||
|
Loading…
Reference in New Issue
Block a user