Show More
@@ -69,8 +69,11 b' class EventManager(object):' | |||
|
69 | 69 | |
|
70 | 70 | # Remove callback in case ``function`` was adapted by `backcall`. |
|
71 | 71 | for callback in self.callbacks[event]: |
|
72 | if callback.__wrapped__ is function: | |
|
73 | return self.callbacks[event].remove(callback) | |
|
72 | try: | |
|
73 | if callback.__wrapped__ is function: | |
|
74 | return self.callbacks[event].remove(callback) | |
|
75 | except AttributeError: | |
|
76 | pass | |
|
74 | 77 | |
|
75 | 78 | raise ValueError('Function {!r} is not registered as a {} callback'.format(function, event)) |
|
76 | 79 |
General Comments 0
You need to be logged in to leave comments.
Login now