From 341527779be2b4fd34eb38b3aec705487ee60ce0 Mon Sep 17 00:00:00 2001 From: Jonathan Frederic Date: Thu, 25 Sep 2014 14:51:38 -0700 Subject: [PATCH] Fix notify_trait getting called too early. --- IPython/html/widgets/widget.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IPython/html/widgets/widget.py b/IPython/html/widgets/widget.py index 1739bd04a..fd0288387 100644 --- a/IPython/html/widgets/widget.py +++ b/IPython/html/widgets/widget.py @@ -327,11 +327,11 @@ class Widget(LoggingConfigurable): # Trigger default traitlet callback machinery. This allows any user # registered validation to be processed prior to allowing the widget # machinery to handle the state. - super(Widget, self)._notify_trait(name, old_value, new_value) + LoggingConfigurable._notify_trait(self, name, old_value, new_value) # Send the state after the user registered callbacks for trait changes # have all fired (allows for user to validate values). - if name in self.keys: + if self.comm is not None and name in self.keys: # Make sure this isn't information that the front-end just sent us. if self._should_send_property(name, new_value): # Send new state to front-end