mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-05 09:26:10 +00:00
[lint] Limit unneccessarily broad except clauses
Add exception qualifier(s) to bare except clauses swallowing exceptions.
This commit is contained in:
@ -58,7 +58,7 @@ def flatten_error_dict(d, key=''):
|
||||
if isinstance(v, dict):
|
||||
try:
|
||||
_errors = v['_errors']
|
||||
except Exception:
|
||||
except KeyError:
|
||||
items.extend(flatten_error_dict(v, new_key).items())
|
||||
else:
|
||||
items.append((new_key, ' '.join(x.get('message', '') for x in _errors)))
|
||||
|
Reference in New Issue
Block a user