##// END OF EJS Templates
use delay_trait_notifications in Configurable._load_config
Min RK -
Show More
@@ -138,11 +138,14 b' class Configurable(HasTraits):'
138 section_names = self.section_names()
138 section_names = self.section_names()
139
139
140 my_config = self._find_my_config(cfg)
140 my_config = self._find_my_config(cfg)
141
142 # hold trait notifications until after all config has been loaded
143 with self.delay_trait_notifications():
141 for name, config_value in iteritems(my_config):
144 for name, config_value in iteritems(my_config):
142 if name in traits:
145 if name in traits:
143 if isinstance(config_value, LazyConfigValue):
146 if isinstance(config_value, LazyConfigValue):
144 # ConfigValue is a wrapper for using append / update on containers
147 # ConfigValue is a wrapper for using append / update on containers
145 # without having to copy the
148 # without having to copy the initial value
146 initial = getattr(self, name)
149 initial = getattr(self, name)
147 config_value = config_value.get_value(initial)
150 config_value = config_value.get_value(initial)
148 # We have to do a deepcopy here if we don't deepcopy the entire
151 # We have to do a deepcopy here if we don't deepcopy the entire
General Comments 0
You need to be logged in to leave comments. Login now