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