From 200a8f1bee468eb921befe3bec697af78aa8b7e1 Mon Sep 17 00:00:00 2001 From: Nicolas Dandrimont Date: Sat, 26 Feb 2011 12:04:09 +0100 Subject: [PATCH] [bcfg2] s/\t/ / darcs-hash:20110226110409-ffbb2-b40d9a357dcca67580a7e9c2593fc37572cf6503.gz --- bcfg2/plugins/Python.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bcfg2/plugins/Python.py b/bcfg2/plugins/Python.py index 305e3dc9..b614bf3a 100644 --- a/bcfg2/plugins/Python.py +++ b/bcfg2/plugins/Python.py @@ -142,17 +142,17 @@ class Python(Bcfg2.Server.Plugin.Plugin,Bcfg2.Server.Plugin.Generator): text = pygen.generate(code, env, logger) except Exception, e: log_traceback(fname, 'exec', e) - raise Bcfg2.Server.Plugin.PluginExecutionError - info = env["info"] - if info.get('encoding', '') == 'base64': - text = binascii.b2a_base64(text) + raise Bcfg2.Server.Plugin.PluginExecutionError + info = env["info"] + if info.get('encoding', '') == 'base64': + text = binascii.b2a_base64(text) # lxml n'accepte que de l'ascii ou de l'unicode try: entry.text = text.decode("UTF-8") except: # solution de fallback entry.text = text.decode("ISO8859-15") - debug(entry.text) + debug(entry.text) entry.attrib['owner'] = info.get('owner', 'root') entry.attrib['group'] = info.get('group', 'root') entry.attrib['perms'] = oct(info.get('perms', 0644))