##// END OF EJS Templates
more default_config into Exporter._config_changed
MinRK -
Show More
@@ -165,18 +165,13 b' class Exporter(LoggingConfigurable):'
165 config : config
165 config : config
166 User configuration instance.
166 User configuration instance.
167 extra_loaders : list[of Jinja Loaders]
167 extra_loaders : list[of Jinja Loaders]
168 ordered list of Jinja loder to find templates. Will be tried in order
168 ordered list of Jinja loader to find templates. Will be tried in order
169 before the default FileSysteme ones.
169 before the default FileSystem ones.
170 template : str (optional, kw arg)
170 template : str (optional, kw arg)
171 Template to use when exporting.
171 Template to use when exporting.
172 """
172 """
173
173
174 #Call the base class constructor
174 super(Exporter, self).__init__(config=config, **kw)
175 c = self.default_config
176 if config:
177 c.merge(config)
178
179 super(Exporter, self).__init__(config=c, **kw)
180
175
181 #Init
176 #Init
182 self._init_template(**kw)
177 self._init_template(**kw)
@@ -188,6 +183,14 b' class Exporter(LoggingConfigurable):'
188 @property
183 @property
189 def default_config(self):
184 def default_config(self):
190 return Config()
185 return Config()
186
187 def _config_changed(self, name, old, new):
188 c = self.default_config
189 if new:
190 c.merge(new)
191 if c != new:
192 self.config = c
193
191
194
192 def _load_template(self):
195 def _load_template(self):
193 if self.template is not None:
196 if self.template is not None:
General Comments 0
You need to be logged in to leave comments. Login now