##// END OF EJS Templates
Merge pull request #12625 from impact27/patch-7...
Matthias Bussonnier -
r26141:978ed5b0 merge
parent child Browse files
Show More
@@ -60,7 +60,8 b' class EventManager(object):'
60 if not callable(function):
60 if not callable(function):
61 raise TypeError('Need a callable, got %r' % function)
61 raise TypeError('Need a callable, got %r' % function)
62 callback_proto = available_events.get(event)
62 callback_proto = available_events.get(event)
63 self.callbacks[event].append(callback_proto.adapt(function))
63 if function not in self.callbacks[event]:
64 self.callbacks[event].append(callback_proto.adapt(function))
64
65
65 def unregister(self, event, function):
66 def unregister(self, event, function):
66 """Remove a callback from the given event."""
67 """Remove a callback from the given event."""
General Comments 0
You need to be logged in to leave comments. Login now