mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 14:59:34 +01:00
Add a heapify because our modifications don't guarantee that the heap property is preserved.
This commit is contained in:
parent
bea41b308a
commit
07585182af
@ -90,6 +90,7 @@ class Schedule(drivers.IrcDriver):
|
||||
"""Removes the event with the given name from the schedule."""
|
||||
del self.events[name]
|
||||
self.schedule = [(t, n) for (t, n) in self.schedule if n != name]
|
||||
heapq.heapify(self.schedule)
|
||||
|
||||
def addPeriodicEvent(self, f, t, name=None):
|
||||
"""Adds a periodic event that is called every t seconds."""
|
||||
|
Loading…
Reference in New Issue
Block a user