forked from openlp/openlp
Fix up some more linting issues
This commit is contained in:
parent
e3b46b9430
commit
dc5a9590ba
@ -704,7 +704,7 @@ class ServiceManager(QtWidgets.QWidget, RegistryBase, Ui_ServiceManager, LogMixi
|
||||
Settings().setValue('servicemanager/last file', file_path)
|
||||
else:
|
||||
raise ValidationError(msg='No service data found')
|
||||
except (NameError, OSError, ValidationError, zipfile.BadZipFile) as e:
|
||||
except (NameError, OSError, ValidationError, zipfile.BadZipFile):
|
||||
self.log_exception('Problem loading service file {name}'.format(name=file_path))
|
||||
critical_error_message_box(
|
||||
message=translate('OpenLP.ServiceManager',
|
||||
|
@ -583,7 +583,7 @@ class BibleImportForm(OpenLPWizard):
|
||||
(WebDownload.Bibleserver, BSExtract())):
|
||||
try:
|
||||
bibles = extractor.get_bibles_from_http()
|
||||
except (urllib.error.URLError, ConnectionError) as err:
|
||||
except (urllib.error.URLError, ConnectionError):
|
||||
critical_error_message_box(translate('BiblesPlugin.ImportWizardForm', 'Error during download'),
|
||||
translate('BiblesPlugin.ImportWizardForm',
|
||||
'An error occurred while downloading the list of bibles from %s.'))
|
||||
|
@ -749,7 +749,7 @@ def get_soup_for_bible_ref(reference_url, headers=None, pre_parse_regex=None, pr
|
||||
return None
|
||||
try:
|
||||
page_source = get_web_page(reference_url, headers, update_openlp=True)
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
log.exception('Unable to download Bible %s, unknown exception occurred', reference_url)
|
||||
page_source = None
|
||||
if not page_source:
|
||||
|
@ -279,7 +279,7 @@ class PdfDocument(PresentationDocument):
|
||||
for image_path in created_files:
|
||||
if image_path.is_file():
|
||||
self.image_files.append(image_path)
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
log.exception(runlog)
|
||||
return False
|
||||
self.num_pages = len(self.image_files)
|
||||
|
@ -107,7 +107,7 @@ class EasySlidesImport(SongImport):
|
||||
def _add_authors(self, writer):
|
||||
try:
|
||||
self.parse_author(str(writer))
|
||||
except UnicodeDecodeError as e:
|
||||
except UnicodeDecodeError:
|
||||
log.exception('Unicode decode error while decoding Writer')
|
||||
self._success = False
|
||||
|
||||
|
@ -194,7 +194,7 @@ class SundayPlusImport(SongImport):
|
||||
while True:
|
||||
try:
|
||||
return blob.decode(self.encoding)
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
self.encoding = retrieve_windows_encoding()
|
||||
|
||||
def unescape(self, text):
|
||||
|
Loading…
Reference in New Issue
Block a user