diff options
author | R. Tyler Ballance <tyler@monkeypox.org> | 2009-11-18 19:17:13 -0800 |
---|---|---|
committer | R. Tyler Ballance <tyler@monkeypox.org> | 2009-11-18 19:17:13 -0800 |
commit | 59354e88a548c0b62f756daa16dd458a64039483 (patch) | |
tree | 543d21df06b62afc0aee25c27d4174ae0b4134a1 /cheetah | |
parent | 3f373110b96f7453b8501178c47abfd506b5e126 (diff) | |
download | python-cheetah-59354e88a548c0b62f756daa16dd458a64039483.tar.gz |
Correct regression introduced with DirectiveAnalyzer
Diffstat (limited to 'cheetah')
-rw-r--r-- | cheetah/DirectiveAnalyzer.py | 2 | ||||
-rw-r--r-- | cheetah/Template.py | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/cheetah/DirectiveAnalyzer.py b/cheetah/DirectiveAnalyzer.py index b297f67..070ef6c 100644 --- a/cheetah/DirectiveAnalyzer.py +++ b/cheetah/DirectiveAnalyzer.py @@ -32,7 +32,7 @@ class AnalysisCompiler(Compiler.ModuleCompiler): def analyze(source): klass = Template.Template.compile(source, compilerClass=AnalysisCompiler) - return klass._CHEETAH_compilerClass._parser.calls + return klass._CHEETAH_compilerInstance._parser.calls def main_file(f): fd = open(f, 'r') diff --git a/cheetah/Template.py b/cheetah/Template.py index 22d98f0..0eba725 100644 --- a/cheetah/Template.py +++ b/cheetah/Template.py @@ -292,6 +292,7 @@ class Template(Servlet): _CHEETAH_defaultMainMethodName = None _CHEETAH_compilerSettings = None _CHEETAH_compilerClass = Compiler + _CHEETAH_compilerInstance = None _CHEETAH_cacheCompilationResults = True _CHEETAH_useCompilationCache = True _CHEETAH_keepRefToGeneratedCode = True @@ -821,7 +822,8 @@ class Template(Servlet): # If we have a compiler object, let's set it to the compiler class # to help the directive analyzer code - templateClass._CHEETAH_compilerClass = compiler or templateClass._CHEETAH_compilerClass + if compiler: + templateClass._CHEETAH_compilerInstance = compiler return templateClass @classmethod |