summaryrefslogtreecommitdiffstats
path: root/src/lib/Server
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2008-05-16 18:01:19 +0000
committerNarayan Desai <desai@mcs.anl.gov>2008-05-16 18:01:19 +0000
commit1ba454ff4af3d2f7e813993d905d60666c296634 (patch)
tree4b6f6ce288fbaedeb281c142d728df89436a9131 /src/lib/Server
parent78865e28ba7f5c1f62a54694cccec7a9fb7745df (diff)
downloadbcfg2-1ba454ff4af3d2f7e813993d905d60666c296634.tar.gz
bcfg2-1ba454ff4af3d2f7e813993d905d60666c296634.tar.bz2
bcfg2-1ba454ff4af3d2f7e813993d905d60666c296634.zip
Fix TCheetah when psyco is used (Completely resolve Ticket #559)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4611 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server')
-rw-r--r--src/lib/Server/Core.py10
-rw-r--r--src/lib/Server/Plugins/TCheetah.py4
2 files changed, 8 insertions, 6 deletions
diff --git a/src/lib/Server/Core.py b/src/lib/Server/Core.py
index 6e72f806f..6bdf2c930 100644
--- a/src/lib/Server/Core.py
+++ b/src/lib/Server/Core.py
@@ -10,11 +10,11 @@ import Bcfg2.Server.Plugins.Metadata
logger = logging.getLogger('Bcfg2.Core')
-# try:
-# import psyco
-# psyco.full()
-# except:
-# pass
+try:
+ import psyco
+ psyco.full()
+except:
+ pass
def ShouldIgnore(event):
'''Test if the event should be suppresed'''
diff --git a/src/lib/Server/Plugins/TCheetah.py b/src/lib/Server/Plugins/TCheetah.py
index c8c72e494..ec82f5753 100644
--- a/src/lib/Server/Plugins/TCheetah.py
+++ b/src/lib/Server/Plugins/TCheetah.py
@@ -20,7 +20,9 @@ class TemplateFile:
if event.code2str() == 'deleted':
return
try:
- self.template = Cheetah.Template.Template(open(self.name).read())
+ s = {'useStackFrames': False}
+ self.template = Cheetah.Template.Template(open(self.name).read(),
+ compilerSettings=s)
self.template.properties = self.properties.properties
except Cheetah.Parser.ParseError, perror:
logger.error("Cheetah parse error for file %s" % (self.name))