aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar S. Co1 <[email protected]>2019-10-02 18:58:35 -0400
committerGravatar GitHub <[email protected]>2019-10-02 18:58:35 -0400
commit58312af25e598e76ecdb14e5978ac8150a3a463b (patch)
treed680c693d95f77c0ce1b16fbb76e11e5aed7d4a7
parentMerge pull request #467 from Ayplow/short-docs (diff)
parentMerge branch 'master' into fix-watchchannels-unload-cog-bug (diff)
Merge pull request #483 from python-discord/fix-watchchannels-unload-cog-bug
Fix `cog_unload` bug in WatchChannel ABC
-rw-r--r--bot/cogs/watchchannels/watchchannel.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/cogs/watchchannels/watchchannel.py b/bot/cogs/watchchannels/watchchannel.py
index ce8014d69..760e012eb 100644
--- a/bot/cogs/watchchannels/watchchannel.py
+++ b/bot/cogs/watchchannels/watchchannel.py
@@ -335,7 +335,7 @@ class WatchChannel(metaclass=CogABCMeta):
def cog_unload(self) -> None:
"""Takes care of unloading the cog and canceling the consumption task."""
self.log.trace(f"Unloading the cog")
- if not self._consume_task.done():
+ if self._consume_task and not self._consume_task.done():
self._consume_task.cancel()
try:
self._consume_task.result()