fix: fix 'broad-exception-caught' for pylint
This commit is contained in:
parent
3deab0b747
commit
1a0fee3582
3 changed files with 3 additions and 2 deletions
|
@ -4,6 +4,7 @@
|
|||
disable=all
|
||||
enable=anomalous-backslash-in-string,
|
||||
bare-except,
|
||||
broad-exception-caught,
|
||||
dangerous-default-value,
|
||||
inconsistent-return-statements,
|
||||
invalid-name,
|
||||
|
|
|
@ -252,7 +252,7 @@ class InstallHandler(GenericHandler):
|
|||
# just need to test interaction and this is a neutral way
|
||||
try:
|
||||
sa.inspect(engine).has_table('whatever')
|
||||
except Exception as error:
|
||||
except Exception as error: # pylint: disable=broad-exception-caught
|
||||
return str(error)
|
||||
return None
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ def load_entry_points(group, ignore_errors=False):
|
|||
for entry_point in eps:
|
||||
try:
|
||||
ep = entry_point.load()
|
||||
except Exception:
|
||||
except Exception: # pylint: disable=broad-exception-caught
|
||||
if not ignore_errors:
|
||||
raise
|
||||
log.warning("failed to load entry point: %s", entry_point,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue