On ne plante pas si toutes les métadonnées sur le fichier ne sont pas définies
darcs-hash:20080209150447-af139-54be5b9423daaefb6377da64b7918f7a7645a208.gz
This commit is contained in:
parent
0755e983ae
commit
52c87ed529
1 changed files with 6 additions and 5 deletions
|
@ -144,14 +144,15 @@ class Python(Bcfg2.Server.Plugin.Plugin):
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
log_traceback(fname, 'exec', e)
|
log_traceback(fname, 'exec', e)
|
||||||
raise Bcfg2.Server.Plugin.PluginExecutionError
|
raise Bcfg2.Server.Plugin.PluginExecutionError
|
||||||
if env["info"]['encoding'] == 'base64':
|
info = env["info"]
|
||||||
|
if info.get('encoding', 'base64') == 'base64':
|
||||||
text = binascii.b2a_base64(text)
|
text = binascii.b2a_base64(text)
|
||||||
entry.text = text
|
entry.text = text
|
||||||
debug(entry.text)
|
debug(entry.text)
|
||||||
entry.attrib['owner'] = env["info"]['owner']
|
entry.attrib['owner'] = info.get('owner', 'root')
|
||||||
entry.attrib['group'] = env["info"]['group']
|
entry.attrib['group'] = info.get('group', 'root')
|
||||||
entry.attrib['perms'] = oct(env["info"]['perms'])
|
entry.attrib['perms'] = oct(info.get('perms', 0644))
|
||||||
entry.attrib['encoding'] = env["info"]['encoding']
|
entry.attrib['encoding'] = info.get('encoding', 'base64')
|
||||||
|
|
||||||
def HandleEvent(self, event):
|
def HandleEvent(self, event):
|
||||||
'''Traitement des événements de FAM'''
|
'''Traitement des événements de FAM'''
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue