aboutsummaryrefslogtreecommitdiff
path: root/discord/ext/commands/cog.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2020-12-03 19:17:06 -0500
committerRapptz <[email protected]>2020-12-03 19:17:28 -0500
commit6ea7fce828987a0678a39dcf4b30634c472fee25 (patch)
tree60a49a273547293edc5968928590bbc215f13057 /discord/ext/commands/cog.py
parentAdd support for chunking AsyncIterator objects (diff)
downloaddiscord.py-6ea7fce828987a0678a39dcf4b30634c472fee25.tar.xz
discord.py-6ea7fce828987a0678a39dcf4b30634c472fee25.zip
[commands] Cog unload failures are swallowed.
Fix #6113
Diffstat (limited to 'discord/ext/commands/cog.py')
-rw-r--r--discord/ext/commands/cog.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/discord/ext/commands/cog.py b/discord/ext/commands/cog.py
index 9ec49ab1..774f5317 100644
--- a/discord/ext/commands/cog.py
+++ b/discord/ext/commands/cog.py
@@ -437,4 +437,7 @@ class Cog(metaclass=CogMeta):
if cls.bot_check_once is not Cog.bot_check_once:
bot.remove_check(self.bot_check_once, call_once=True)
finally:
- self.cog_unload()
+ try:
+ self.cog_unload()
+ except Exception:
+ pass