mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +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:
|
||||
name = self.counter
|
||||
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
|
||||
heapq.heappush(self.schedule, mytuple((t, name)))
|
||||
return name
|
||||
|
Loading…
Reference in New Issue
Block a user