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()
|
||||
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue