diff options
author | Sol Jerome <sol.jerome@gmail.com> | 2011-05-06 12:46:57 -0500 |
---|---|---|
committer | Sol Jerome <sol.jerome@gmail.com> | 2011-05-06 12:46:57 -0500 |
commit | ab4ab921d96ef9ed1f3246d57ad888b46b17b668 (patch) | |
tree | 7eb2587cb70f75d8cc07e803c6c05551c14598ac /src/lib | |
parent | f9cf76fd1f52777ac10ac6ad69eadfbff3f70ad5 (diff) | |
download | bcfg2-ab4ab921d96ef9ed1f3246d57ad888b46b17b668.tar.gz bcfg2-ab4ab921d96ef9ed1f3246d57ad888b46b17b668.tar.bz2 bcfg2-ab4ab921d96ef9ed1f3246d57ad888b46b17b668.zip |
TCheetah: Fix local variable bug reported by trehn on IRC
Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Server/Plugins/TCheetah.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/Server/Plugins/TCheetah.py b/src/lib/Server/Plugins/TCheetah.py index 151cc6543..49be88881 100644 --- a/src/lib/Server/Plugins/TCheetah.py +++ b/src/lib/Server/Plugins/TCheetah.py @@ -6,6 +6,9 @@ import logging import sys import traceback import Bcfg2.Server.Plugin +# py3k compatibility +if sys.hexversion >= 0x03000000: + unicode = str logger = logging.getLogger('Bcfg2.Plugins.TCheetah') @@ -53,9 +56,6 @@ class TemplateFile: if entry.tag == 'Path': entry.set('type', 'file') try: - # py3k compatibility - if sys.hexversion >= 0x03000000: - unicode = str if type(self.template) == unicode: entry.text = self.template else: |