mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
asserts should have an associated message.
This commit is contained in:
parent
5a7442c382
commit
2c96a65704
@ -80,7 +80,8 @@ class Schedule(drivers.IrcDriver):
|
|||||||
if name is None:
|
if name is None:
|
||||||
name = self.counter
|
name = self.counter
|
||||||
self.counter += 1
|
self.counter += 1
|
||||||
assert name not in self.events
|
assert name not in self.events, \
|
||||||
|
'An event with the same name has already been scheduled.'
|
||||||
self.events[name] = f
|
self.events[name] = f
|
||||||
heapq.heappush(self.schedule, mytuple((t, name)))
|
heapq.heappush(self.schedule, mytuple((t, name)))
|
||||||
return name
|
return name
|
||||||
|
Loading…
Reference in New Issue
Block a user