From 3f659fe4436958eee8fc9cd8412c5c0f2a147972 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 26 Mar 2012 23:56:44 -0400 Subject: use a dollar sign instead of an under --- pyramid/mako_templating.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pyramid/mako_templating.py b/pyramid/mako_templating.py index c4c12f02a..208e54bf5 100644 --- a/pyramid/mako_templating.py +++ b/pyramid/mako_templating.py @@ -35,7 +35,6 @@ class PkgResourceTemplateLookup(TemplateLookup): # Don't adjust asset spec names isabs = os.path.isabs(uri) if (not isabs) and (':' in uri): - # fbo asset specs on windows: cant have colons in filename return uri return TemplateLookup.adjust_uri(self, uri, relativeto) @@ -50,7 +49,11 @@ class PkgResourceTemplateLookup(TemplateLookup): """ isabs = os.path.isabs(uri) if (not isabs) and (':' in uri): - adjusted = uri.replace(':', '_') + # Windows can't cope with colons in filenames, so we replace the + # colon with a dollar sign in the filename mako uses to actually + # store the generated python code in the mako module_directory or + # in the temporary location of mako's modules + adjusted = uri.replace(':', '$') try: if self.filesystem_checks: return self._check(adjusted, self._collection[adjusted]) -- cgit v1.2.3