From 4a69655bfb8ec26f49c03c98631b73d99c108e3f Mon Sep 17 00:00:00 2001 From: zevaryx Date: Tue, 19 Apr 2022 13:59:30 -0600 Subject: [PATCH] Deactivate lock regardless of error --- jarvis_tasks/tasks/lock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jarvis_tasks/tasks/lock.py b/jarvis_tasks/tasks/lock.py index 1c56f83..beb468a 100644 --- a/jarvis_tasks/tasks/lock.py +++ b/jarvis_tasks/tasks/lock.py @@ -27,9 +27,9 @@ async def _unlock(channel: GuildChannel, lock: Lock, logger: Logger) -> None: await channel.delete_permission(target=overwrite, reason="Automatic unlock") else: logger.debug("Permission neither exists not existed") - lock.active = False except Exception: logger.debug("Locked channel deleted, ignoring error") + lock.active = False await lock.commit()