Permalink
Browse files

Correct regression introduced with DirectiveAnalyzer

  • Loading branch information...
1 parent 3f37311 commit 59354e88a548c0b62f756daa16dd458a64039483 @rtyler rtyler committed Nov 19, 2009
Showing with 4 additions and 2 deletions.
  1. +1 −1 cheetah/DirectiveAnalyzer.py
  2. +3 −1 cheetah/Template.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')
View
@@ -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 @@ def __str__(self): return self.respond()
# 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

0 comments on commit 59354e8

Please sign in to comment.