##// END OF EJS Templates
don't try template names we know to be invalid...
MinRK -
Show More
@@ -215,10 +215,14 b' class Exporter(LoggingConfigurable):'
215 # as if the name is explicitly specified, then try the name as a
215 # as if the name is explicitly specified, then try the name as a
216 # 'flavor', and lastly just try to load the template by module name.
216 # 'flavor', and lastly just try to load the template by module name.
217 module_name = self.__module__.rsplit('.', 1)[-1]
217 module_name = self.__module__.rsplit('.', 1)[-1]
218 try_names = [self.template_file + self.template_extension,
218 try_names = []
219 self.template_file,
219 if self.template_file:
220 module_name + '_' + self.template_file + self.template_extension,
220 try_names.extend([
221 module_name + self.template_extension]
221 self.template_file + self.template_extension,
222 self.template_file,
223 module_name + '_' + self.template_file + self.template_extension,
224 ])
225 try_names.append(module_name + self.template_extension)
222 for try_name in try_names:
226 for try_name in try_names:
223 self.log.debug("Attempting to load template %s", try_name)
227 self.log.debug("Attempting to load template %s", try_name)
224 try:
228 try:
General Comments 0
You need to be logged in to leave comments. Login now