From b87032d46b26b946ea6a26b16709fc617e1838f2 Mon Sep 17 00:00:00 2001 From: StephenNneji <34302892+StephenNneji@users.noreply.github.com> Date: Sat, 8 Jun 2019 14:30:50 +0100 Subject: [PATCH] Template is not found when extension is an empty string on Linux Locator.make_file_name(...) always appends a dot at the end of filename when the extension string is empty. This is not a problem on Windows since the trailing dot is stripped but on Linux the file is never found. --- pystache/locator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pystache/locator.py b/pystache/locator.py index 30c5b01e..364b6d55 100644 --- a/pystache/locator.py +++ b/pystache/locator.py @@ -91,7 +91,7 @@ def make_file_name(self, template_name, template_extension=None): if template_extension is None: template_extension = self.template_extension - if template_extension is not False: + if template_extension: file_name += os.path.extsep + template_extension return file_name