Minor adjustment to cleanup().
This commit is contained in:
parent
c796161e55
commit
f872c038fc
1 changed files with 2 additions and 2 deletions
|
|
@ -200,8 +200,8 @@ class CooldownHandler:
|
||||||
now = time.time()
|
now = time.time()
|
||||||
cooldowns = dict(self.data)
|
cooldowns = dict(self.data)
|
||||||
keys = [x for x in cooldowns.keys() if cooldowns[x] - now < 0]
|
keys = [x for x in cooldowns.keys() if cooldowns[x] - now < 0]
|
||||||
|
if keys:
|
||||||
for key in keys:
|
for key in keys:
|
||||||
del cooldowns[key]
|
del cooldowns[key]
|
||||||
if keys:
|
|
||||||
self.obj.attributes.add(self.db_attribute, cooldowns)
|
self.obj.attributes.add(self.db_attribute, cooldowns)
|
||||||
self.data = self.obj.attributes.get(self.db_attribute)
|
self.data = self.obj.attributes.get(self.db_attribute)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue