diff --git a/IPython/html/widgets/widget.py b/IPython/html/widgets/widget.py index d739bdf..4e399f3 100644 --- a/IPython/html/widgets/widget.py +++ b/IPython/html/widgets/widget.py @@ -66,7 +66,7 @@ class CallbackDispatcher(LoggingConfigurable): # (Un)Register the callback. if remove and callback in callback_list: callback_list.remove(callback) - else not remove and callback not in callback_list: + elif not remove and callback not in callback_list: callback_list.append(callback) def _validate_nargs(self, nargs):