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 FileSystem |
|
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) | |
@@ -189,6 +184,14 b' class Exporter(LoggingConfigurable):' | |||||
189 | def default_config(self): |
|
184 | def default_config(self): | |
190 | return Config() |
|
185 | return Config() | |
191 |
|
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 | ||||
|
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: | |
194 | return |
|
197 | return |
General Comments 0
You need to be logged in to leave comments.
Login now