##// END OF EJS Templates
Merge pull request #12653 from meeseeksmachine/auto-backport-of-pr-12625-on-7.x...
Matthias Bussonnier -
r26164:e07c9ffe 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