asserts should have an associated message.

This commit is contained in:
James Vega 2005-03-22 14:45:21 +00:00
parent 5a7442c382
commit 2c96a65704

View File

@ -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