diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Server/Plugins/TCheetah.py | 5 | ||||
-rw-r--r-- | src/lib/Server/Plugins/TGenshi.py | 4 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/Server/Plugins/TCheetah.py b/src/lib/Server/Plugins/TCheetah.py index 9806e5787..9065b5ceb 100644 --- a/src/lib/Server/Plugins/TCheetah.py +++ b/src/lib/Server/Plugins/TCheetah.py @@ -14,6 +14,7 @@ class TemplateFile: self.specific = specific self.encoding = encoding self.template = None + self.searchlist = dict() def handle_event(self, event): '''Handle all fs events for this template''' @@ -22,7 +23,8 @@ class TemplateFile: try: s = {'useStackFrames': False} self.template = Cheetah.Template.Template(open(self.name).read(), - compilerSettings=s) + compilerSettings=s, + searchList=self.searchlist) except Cheetah.Parser.ParseError, perror: logger.error("Cheetah parse error for file %s" % (self.name)) logger.error(perror.report()) @@ -40,7 +42,6 @@ class TemplateFile: if type(self.template) == unicode: entry.text = self.template else : - logger.debug("Override encoding of template to %s" % self.encoding) entry.text = unicode(str(self.template), self.encoding) except: (a, b, c) = sys.exc_info() diff --git a/src/lib/Server/Plugins/TGenshi.py b/src/lib/Server/Plugins/TGenshi.py index 40e65b877..3743517a9 100644 --- a/src/lib/Server/Plugins/TGenshi.py +++ b/src/lib/Server/Plugins/TGenshi.py @@ -72,16 +72,12 @@ class TemplateFile: if type(textdata) == unicode: entry.text = textdata else: - if self.encoding != 'ascii': - logger.debug("Override encoding of %s TGenshi template to %s" % (self.name, self.encoding)) entry.text = unicode(textdata, self.encoding) else: xmldata = stream.render('xml') if type(xmldata) == unicode: entry.text = xmldata else: - if self.encoding != 'ascii': - logger.debug("Override encoding of %s TGenshi template to %s" % (self.name, self.encoding)) entry.text = unicode(xmldata, self.encoding) except TemplateError, terror: logger.error('Genshi template error: %s' % terror) |