##// END OF EJS Templates
override null config with parent's config
MinRK -
Show More
@@ -83,7 +83,7 b' class Configurable(HasTraits):'
83 parent = kwargs.pop('parent', None)
83 parent = kwargs.pop('parent', None)
84 if parent:
84 if parent:
85 # config is implied from parent
85 # config is implied from parent
86 if 'config' not in kwargs:
86 if kwargs.get('config', None) is None:
87 kwargs['config'] = parent.config
87 kwargs['config'] = parent.config
88 self.parent = parent
88 self.parent = parent
89
89
@@ -159,7 +159,6 b' class Configurable(HasTraits):'
159 # load parent config as well, if we have one
159 # load parent config as well, if we have one
160 parent_section_names = [] if self.parent is None else self.parent.section_names()
160 parent_section_names = [] if self.parent is None else self.parent.section_names()
161 for parent in parent_section_names:
161 for parent in parent_section_names:
162 print parent, new._has_section(parent), new[parent]
163 if not new._has_section(parent):
162 if not new._has_section(parent):
164 continue
163 continue
165 self._load_config(new[parent], traits=traits, section_names=section_names)
164 self._load_config(new[parent], traits=traits, section_names=section_names)
General Comments 0
You need to be logged in to leave comments. Login now