aboutsummaryrefslogtreecommitdiff
path: root/discord/ext
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/ext
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/ext')
-rw-r--r--discord/ext/commands/bot.py6
-rw-r--r--discord/ext/commands/core.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py
index c9ce299e..04a5452f 100644
--- a/discord/ext/commands/bot.py
+++ b/discord/ext/commands/bot.py
@@ -195,13 +195,13 @@ class BotBase(GroupMixin):
for extension in tuple(self.extensions):
try:
self.unload_extension(extension)
- except:
+ except Exception:
pass
for cog in tuple(self.cogs):
try:
self.remove_cog(cog)
- except:
+ except Exception:
pass
await super().close()
@@ -759,7 +759,7 @@ class BotBase(GroupMixin):
else:
try:
func(self)
- except:
+ except Exception:
pass
finally:
# finally remove the import..
diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py
index 0aa79645..bcf2cd8a 100644
--- a/discord/ext/commands/core.py
+++ b/discord/ext/commands/core.py
@@ -240,7 +240,7 @@ class Command:
try:
module = converter.__module__
- except:
+ except AttributeError:
pass
else:
if module.startswith('discord.') and not module.endswith('converter'):