summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins/TCheetah.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-02-02 20:18:34 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-02-02 20:18:34 +0000
commitcf9b9d397472cfbbdbf0db47975fc67020860c28 (patch)
tree5dd7fc87bc78fa2cbf12b0ab6c9f902afc2d1d2d /src/lib/Server/Plugins/TCheetah.py
parentcd0f3c4da901ab9cecc0ff1cb73382df425e2c7b (diff)
downloadbcfg2-cf9b9d397472cfbbdbf0db47975fc67020860c28.tar.gz
bcfg2-cf9b9d397472cfbbdbf0db47975fc67020860c28.tar.bz2
bcfg2-cf9b9d397472cfbbdbf0db47975fc67020860c28.zip
Fix unicode error messages
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5057 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugins/TCheetah.py')
-rw-r--r--src/lib/Server/Plugins/TCheetah.py5
1 files changed, 3 insertions, 2 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()