Commit a111e916 by xgecko

Added find_file function, and remove extension check logic from make_file_name

parent 2b07ad52
......@@ -91,7 +91,7 @@ class Locator(object):
if template_extension is None:
template_extension = self.template_extension
if template_extension is not False and not file_name.endswith(template_extension):
if template_extension is not False:
file_name += os.path.extsep + template_extension
return file_name
......@@ -123,6 +123,13 @@ class Locator(object):
return path
def find_file(self, template_file, search_dirs):
"""
Return the path to a template with the given file name.
"""
return self._find_path_required(search_dirs, template_file)
def find_name(self, template_name, search_dirs):
"""
Return the path to a template with the given name.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment