diff options
| author | 2020-06-07 12:37:31 +0200 | |
|---|---|---|
| committer | 2020-06-07 12:37:31 +0200 | |
| commit | 15dbbcf865dd24f5f8697fd85bd60d53d9450fcf (patch) | |
| tree | 440af301e8a5480632d25ddf99e431c16b85a302 | |
| parent | Merge branch 'master' into help_channel_rediscache (diff) | |
Remove pointless suppress.
Since help_channel_claimants.delete will never raise a KeyError, it's
not necessary to suppress one.
| -rw-r--r-- | bot/cogs/help_channels.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py index 01c38b408..e521e3301 100644 --- a/bot/cogs/help_channels.py +++ b/bot/cogs/help_channels.py @@ -5,7 +5,6 @@ import logging import random import typing as t from collections import deque -from contextlib import suppress from datetime import datetime from pathlib import Path @@ -224,10 +223,11 @@ class HelpChannels(Scheduler, commands.Cog): log.trace("close command invoked; checking if the channel is in-use.") if ctx.channel.category == self.in_use_category: if await self.dormant_check(ctx): - with suppress(KeyError): - await self.help_channel_claimants.delete(ctx.channel.id) + # Remove the claimant and the cooldown role + await self.help_channel_claimants.delete(ctx.channel.id) await self.remove_cooldown_role(ctx.author) + # Ignore missing task when cooldown has passed but the channel still isn't dormant. self.cancel_task(ctx.author.id, ignore_missing=True) |