aboutsummaryrefslogtreecommitdiffstats
path: root/mako/ext/autohandler.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-11-13 16:03:54 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2010-11-13 16:03:54 -0500
commit7b988e4f7b289a534ac349f003d997087b8bf565 (patch)
tree34991b2d18371ef9f3a467ac89b18179cc1fb700 /mako/ext/autohandler.py
parent41f53f97c38087f2ea070b0c78986df0cf8f7478 (diff)
downloadexternal_python_mako-7b988e4f7b289a534ac349f003d997087b8bf565.tar.gz
external_python_mako-7b988e4f7b289a534ac349f003d997087b8bf565.tar.bz2
external_python_mako-7b988e4f7b289a534ac349f003d997087b8bf565.zip
cleanuprel_0_3_6
Diffstat (limited to 'mako/ext/autohandler.py')
-rw-r--r--mako/ext/autohandler.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/mako/ext/autohandler.py b/mako/ext/autohandler.py
index 3025f8e..2ca88e1 100644
--- a/mako/ext/autohandler.py
+++ b/mako/ext/autohandler.py
@@ -5,7 +5,7 @@ requires that the TemplateLookup class is used with templates.
usage:
<%!
- from mako.ext.autohandler import autohandler
+ from mako.ext.autohandler import autohandler
%>
<%inherit file="${autohandler(template, context)}"/>
@@ -13,7 +13,7 @@ usage:
or with custom autohandler filename:
<%!
- from mako.ext.autohandler import autohandler
+ from mako.ext.autohandler import autohandler
%>
<%inherit file="${autohandler(template, context, name='somefilename')}"/>
@@ -35,7 +35,8 @@ def autohandler(template, context, name='autohandler'):
path = '/' + '/'.join(tokens)
if path != _template_uri and _file_exists(lookup, path):
if not lookup.filesystem_checks:
- return lookup._uri_cache.setdefault((autohandler, _template_uri, name), path)
+ return lookup._uri_cache.setdefault(
+ (autohandler, _template_uri, name), path)
else:
return path
if len(tokens) == 1:
@@ -43,7 +44,8 @@ def autohandler(template, context, name='autohandler'):
tokens[-2:] = [name]
if not lookup.filesystem_checks:
- return lookup._uri_cache.setdefault((autohandler, _template_uri, name), None)
+ return lookup._uri_cache.setdefault(
+ (autohandler, _template_uri, name), None)
else:
return None