summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2012-03-26 23:56:44 -0400
committerChris McDonough <chrism@plope.com>2012-03-26 23:56:44 -0400
commit3f659fe4436958eee8fc9cd8412c5c0f2a147972 (patch)
treebd590c3e2d3c4e3b8288614de9e5ba210dc88b91
parent57835f2edb1592bd3cc0d006de401ace5fc3552c (diff)
downloadpyramid-3f659fe4436958eee8fc9cd8412c5c0f2a147972.tar.gz
pyramid-3f659fe4436958eee8fc9cd8412c5c0f2a147972.tar.bz2
pyramid-3f659fe4436958eee8fc9cd8412c5c0f2a147972.zip
use a dollar sign instead of an under
-rw-r--r--pyramid/mako_templating.py7
1 files 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])