diff --git a/evennia/contrib/cooldowns.py b/evennia/contrib/cooldowns.py index 4a565d6c8e..3f9ba66bb6 100644 --- a/evennia/contrib/cooldowns.py +++ b/evennia/contrib/cooldowns.py @@ -200,8 +200,8 @@ class CooldownHandler: now = time.time() cooldowns = dict(self.data) keys = [x for x in cooldowns.keys() if cooldowns[x] - now < 0] - for key in keys: - del cooldowns[key] if keys: + for key in keys: + del cooldowns[key] self.obj.attributes.add(self.db_attribute, cooldowns) self.data = self.obj.attributes.get(self.db_attribute)