aboutsummaryrefslogtreecommitdiff
path: root/discord/errors.py
diff options
context:
space:
mode:
authorHornwitser <[email protected]>2018-06-22 15:12:56 +0200
committerRapptz <[email protected]>2018-11-24 22:17:57 -0500
commita71b3b5fa0a814c1610b2c685ca8bcbbb233e52a (patch)
tree6e99e481ae99f632f89e906eaffbdb854bb13715 /discord/errors.py
parentRevert "Rework documentation to not duplicate inherited members." (diff)
downloaddiscord.py-a71b3b5fa0a814c1610b2c685ca8bcbbb233e52a.tar.xz
discord.py-a71b3b5fa0a814c1610b2c685ca8bcbbb233e52a.zip
[lint] Limit unneccessarily broad except clauses
Add exception qualifier(s) to bare except clauses swallowing exceptions.
Diffstat (limited to 'discord/errors.py')
-rw-r--r--discord/errors.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/errors.py b/discord/errors.py
index 3111675a..004620d3 100644
--- a/discord/errors.py
+++ b/discord/errors.py
@@ -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)))