summaryrefslogtreecommitdiff
path: root/pystache
diff options
context:
space:
mode:
authorxgecko <jonathan@xgecko.com>2012-07-20 13:03:26 -0700
committerxgecko <jonathan@xgecko.com>2012-07-20 13:03:26 -0700
commitae68dc1a863d3562ea85de9616c1b212aaa5ee77 (patch)
tree3c4d22d5f17f17822ea69f6d6af5cfcb96bc7dbc /pystache
parentb8a3d0c6cea62874bac2414db2c06856293d8877 (diff)
downloadpystache-ae68dc1a863d3562ea85de9616c1b212aaa5ee77.tar.gz
Updated to not append template_extension if it is already there.
Diffstat (limited to 'pystache')
-rw-r--r--pystache/locator.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pystache/locator.py b/pystache/locator.py
index 2189cf2..6ffc951 100644
--- a/pystache/locator.py
+++ b/pystache/locator.py
@@ -92,7 +92,8 @@ class Locator(object):
template_extension = self.template_extension
if template_extension is not False:
- file_name += os.path.extsep + template_extension
+ if not file_name.endswith(template_extension):
+ file_name += os.path.extsep + template_extension
return file_name