summaryrefslogtreecommitdiffstats
path: root/src/lib/Server
diff options
context:
space:
mode:
authorSol Jerome <sol.jerome@gmail.com>2011-05-06 08:35:54 -0500
committerSol Jerome <sol.jerome@gmail.com>2011-05-06 08:36:24 -0500
commit071ef1a1fbe6368b1abb81855e1ab95e316e6911 (patch)
treefb28060b6b3c683db237bab74cc8e000c29f07ee /src/lib/Server
parent8938b4025400d150db4b6fb32181cd36c294e07c (diff)
downloadbcfg2-071ef1a1fbe6368b1abb81855e1ab95e316e6911.tar.gz
bcfg2-071ef1a1fbe6368b1abb81855e1ab95e316e6911.tar.bz2
bcfg2-071ef1a1fbe6368b1abb81855e1ab95e316e6911.zip
TGenshi: Fix local variable bug reported by trehn on IRC
Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
Diffstat (limited to 'src/lib/Server')
-rw-r--r--src/lib/Server/Plugins/TGenshi.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/Server/Plugins/TGenshi.py b/src/lib/Server/Plugins/TGenshi.py
index 83b60c958..bc5e00400 100644
--- a/src/lib/Server/Plugins/TGenshi.py
+++ b/src/lib/Server/Plugins/TGenshi.py
@@ -3,7 +3,11 @@ __revision__ = '$Revision$'
import binascii
import logging
+import sys
import Bcfg2.Server.Plugin
+# py3k compatibility
+if sys.hexversion >= 0x03000000:
+ unicode = str
logger = logging.getLogger('Bcfg2.Plugins.TGenshi')
@@ -76,9 +80,6 @@ class TemplateFile:
def bind_entry(self, entry, metadata):
"""Build literal file information."""
fname = entry.get('realname', entry.get('name'))
- # py3k compatibility
- if sys.hexversion >= 0x03000000:
- unicode = str
if entry.tag == 'Path':
entry.set('type', 'file')
try: