Show More
@@ -165,18 +165,13 b' class Exporter(LoggingConfigurable):' | |||
|
165 | 165 | config : config |
|
166 | 166 | User configuration instance. |
|
167 | 167 | extra_loaders : list[of Jinja Loaders] |
|
168 | ordered list of Jinja loder to find templates. Will be tried in order | |
|
169 |
before the default FileSystem |
|
|
168 | ordered list of Jinja loader to find templates. Will be tried in order | |
|
169 | before the default FileSystem ones. | |
|
170 | 170 | template : str (optional, kw arg) |
|
171 | 171 | Template to use when exporting. |
|
172 | 172 | """ |
|
173 | 173 | |
|
174 | #Call the base class constructor | |
|
175 | c = self.default_config | |
|
176 | if config: | |
|
177 | c.merge(config) | |
|
178 | ||
|
179 | super(Exporter, self).__init__(config=c, **kw) | |
|
174 | super(Exporter, self).__init__(config=config, **kw) | |
|
180 | 175 | |
|
181 | 176 | #Init |
|
182 | 177 | self._init_template(**kw) |
@@ -188,6 +183,14 b' class Exporter(LoggingConfigurable):' | |||
|
188 | 183 | @property |
|
189 | 184 | def default_config(self): |
|
190 | 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 | 195 | def _load_template(self): |
|
193 | 196 | if self.template is not None: |
General Comments 0
You need to be logged in to leave comments.
Login now