summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins
diff options
context:
space:
mode:
authorSol Jerome <sol.jerome@gmail.com>2011-05-06 12:46:57 -0500
committerSol Jerome <sol.jerome@gmail.com>2011-06-14 12:36:44 -0500
commitaf8bf14ee0079649d4583fb0850ec25b74242344 (patch)
tree27ac4efa31c416086c1d1fea70382f8df823fd78 /src/lib/Server/Plugins
parent3f3bc1cb0d539b6651605b48300946d0d7ec6560 (diff)
downloadbcfg2-af8bf14ee0079649d4583fb0850ec25b74242344.tar.gz
bcfg2-af8bf14ee0079649d4583fb0850ec25b74242344.tar.bz2
bcfg2-af8bf14ee0079649d4583fb0850ec25b74242344.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/Server/Plugins')
-rw-r--r--src/lib/Server/Plugins/TCheetah.py6
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: