Chris McDonough
2012-03-27 3f659fe4436958eee8fc9cd8412c5c0f2a147972
use a dollar sign instead of an under
1 files modified
7 ■■■■ changed files
pyramid/mako_templating.py 7 ●●●● patch | view | raw | blame | history
pyramid/mako_templating.py
@@ -35,7 +35,6 @@
        # 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 @@
        """
        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])