summaryrefslogtreecommitdiffstats
path: root/src
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:37:08 -0500
commitf9cf76fd1f52777ac10ac6ad69eadfbff3f70ad5 (patch)
tree09b1eb3cd53e27c4b4cc221b56bc9c8b32b6d5d9 /src
parent4c101414df7e224efb8bd52b75781df52c0fb26a (diff)
downloadbcfg2-f9cf76fd1f52777ac10ac6ad69eadfbff3f70ad5.tar.gz
bcfg2-f9cf76fd1f52777ac10ac6ad69eadfbff3f70ad5.tar.bz2
bcfg2-f9cf76fd1f52777ac10ac6ad69eadfbff3f70ad5.zip
TGenshi: Fix local variable bug reported by trehn on IRC
Signed-off-by: Sol Jerome <sol.jerome@gmail.com> (cherry picked from commit 071ef1a1fbe6368b1abb81855e1ab95e316e6911)
Diffstat (limited to 'src')
-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: