summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins/TCheetah.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-07-16 03:42:25 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-07-16 03:42:25 +0000
commit409671bf011df66e2e3fc51d1bc3b84353a3cea5 (patch)
tree2fc11bd4ac5b4e31893ef07b21cc66170136cb16 /src/lib/Server/Plugins/TCheetah.py
parent92aa3cda749240dd931fa1f97340f29ff11bf83d (diff)
downloadbcfg2-409671bf011df66e2e3fc51d1bc3b84353a3cea5.tar.gz
bcfg2-409671bf011df66e2e3fc51d1bc3b84353a3cea5.tar.bz2
bcfg2-409671bf011df66e2e3fc51d1bc3b84353a3cea5.zip
TCheetah: handle imports in a way that pylint likes
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5339 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugins/TCheetah.py')
-rw-r--r--src/lib/Server/Plugins/TCheetah.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/lib/Server/Plugins/TCheetah.py b/src/lib/Server/Plugins/TCheetah.py
index ab87d24d5..87358684c 100644
--- a/src/lib/Server/Plugins/TCheetah.py
+++ b/src/lib/Server/Plugins/TCheetah.py
@@ -8,6 +8,12 @@ import Bcfg2.Server.Plugin
logger = logging.getLogger('Bcfg2.Plugins.TCheetah')
+try:
+ import Cheetah.Template
+ import Cheetah.Parser
+except:
+ logger.error("TCheetah: Failed to import Cheetah. Is it installed?")
+ raise
class TemplateFile:
'''Template file creates Cheetah template structures for the loaded file'''
@@ -61,11 +67,3 @@ class TCheetah(Bcfg2.Server.Plugin.GroupSpool):
__author__ = 'bcfg-dev@mcs.anl.gov'
filename_pattern = 'template'
es_child_cls = TemplateFile
-
- def __init__(self, core, datastore):
- try:
- import Cheetah.Template
- import Cheetah.Parser
- except:
- logger.error("Failed to import TCheetah. Is it installed?")
- raise Bcfg2.Server.Plugin.PluginInitError