diff options
| author | 2020-11-07 09:47:05 +0200 | |
|---|---|---|
| committer | 2020-11-07 09:47:05 +0200 | |
| commit | d15c4fc004e73669014baa25c675a7bf7b8064f9 (patch) | |
| tree | ee1cd3236b967f842e80a20692dc20c57b977a32 | |
| parent | Remove both cogs and extensions on closing (diff) | |
Use result instead exception for watchchannel closing task
| -rw-r--r-- | bot/exts/moderation/watchchannels/_watchchannel.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/moderation/watchchannels/_watchchannel.py b/bot/exts/moderation/watchchannels/_watchchannel.py index b576f2888..8894762f3 100644 --- a/bot/exts/moderation/watchchannels/_watchchannel.py +++ b/bot/exts/moderation/watchchannels/_watchchannel.py @@ -345,7 +345,7 @@ class WatchChannel(metaclass=CogABCMeta): def done_callback(task: asyncio.Task) -> None: """Send exception when consuming task have been cancelled.""" try: - task.exception() + task.result() except asyncio.CancelledError: self.log.error( f"The consume task of {type(self).__name__} was canceled. Messages may be lost." |