aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-07-17 12:04:45 -0700
committerGravatar MarkKoz <[email protected]>2020-07-31 22:58:06 -0700
commit66ca3a8313183bcb245804d68a6f09abd2724245 (patch)
treefab2578f9fa51f01586c20472d1cf755ae37fef4
parentDecorators: support awaitables for resource ID (diff)
Decorators: fix lock creation
-rw-r--r--bot/decorators.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/decorators.py b/bot/decorators.py
index 063368dda..abf7474ef 100644
--- a/bot/decorators.py
+++ b/bot/decorators.py
@@ -126,7 +126,7 @@ def mutually_exclusive(namespace: t.Hashable, resource_id: ResourceId) -> t.Call
# Get the lock for the ID. Create a Lock if one doesn't exist yet.
locks = __lock_dicts[namespace]
- lock = locks.setdefault(id_, asyncio.Lock)
+ lock = locks.setdefault(id_, asyncio.Lock())
if not lock.locked():
# Resource is free; acquire it.