Commit 200a8f1b authored by Nicolas Dandrimont's avatar Nicolas Dandrimont

[bcfg2] s/\t/ /

darcs-hash:20110226110409-ffbb2-b40d9a357dcca67580a7e9c2593fc37572cf6503.gz
parent 4bd528bd
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment