mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Forgot to return the name in addEvent.
This commit is contained in:
parent
87f3c2a644
commit
1f441c54bd
@ -79,6 +79,7 @@ class Schedule(drivers.IrcDriver):
|
||||
assert name not in self.events
|
||||
self.events[name] = f
|
||||
heapq.heappush(self.schedule, mytuple((t, name)))
|
||||
return name
|
||||
|
||||
def removeEvent(self, name):
|
||||
"""Removes the event with the given name from the schedule."""
|
||||
@ -90,8 +91,8 @@ class Schedule(drivers.IrcDriver):
|
||||
"""Adds a periodic event that is called every t seconds."""
|
||||
def wrapper():
|
||||
f()
|
||||
self.addEvent(wrapper, time.time() + t, name)
|
||||
wrapper()
|
||||
return self.addEvent(wrapper, time.time() + t, name)
|
||||
return wrapper()
|
||||
|
||||
removePeriodicEvent = removeEvent
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user