diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2009-07-16 03:42:25 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2009-07-16 03:42:25 +0000 |
commit | 409671bf011df66e2e3fc51d1bc3b84353a3cea5 (patch) | |
tree | 2fc11bd4ac5b4e31893ef07b21cc66170136cb16 /src/lib/Server/Plugins/TCheetah.py | |
parent | 92aa3cda749240dd931fa1f97340f29ff11bf83d (diff) | |
download | bcfg2-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.py | 14 |
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 |