diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-11-11 15:16:22 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-11-11 15:16:22 -0500 |
commit | 3bbeaef7d5576fcefd1ccec3661ce7e3fd454094 (patch) | |
tree | 446a6b17199a0d722234bafb04ca95a1860c4644 /mako/template.py | |
parent | f298b36d4e940b1f9e737a64bbd06182da9794fa (diff) | |
download | external_python_mako-3bbeaef7d5576fcefd1ccec3661ce7e3fd454094.tar.gz external_python_mako-3bbeaef7d5576fcefd1ccec3661ce7e3fd454094.tar.bz2 external_python_mako-3bbeaef7d5576fcefd1ccec3661ce7e3fd454094.zip |
py2.5 works
Diffstat (limited to 'mako/template.py')
-rw-r--r-- | mako/template.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mako/template.py b/mako/template.py index d32e465..acbf05e 100644 --- a/mako/template.py +++ b/mako/template.py @@ -663,7 +663,10 @@ def _compile_module_file(template, text, filename, outputpath, module_writer): shutil.move(name, outputpath) def _get_module_info_from_callable(callable_): - return _get_module_info(callable_.__globals__['__name__']) + if compat.py3k: + return _get_module_info(callable_.__globals__['__name__']) + else: + return _get_module_info(callable_.func_globals['__name__']) def _get_module_info(filename): return ModuleInfo._modules[filename] |