summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins/Cfg.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2005-12-06 18:50:52 +0000
committerNarayan Desai <desai@mcs.anl.gov>2005-12-06 18:50:52 +0000
commit592d406208fb387fc14b5ec2663804d9f6a22a49 (patch)
tree5a263a9e5144956b18460f91a62880beaf9450fa /src/lib/Server/Plugins/Cfg.py
parentccc99edf650eb11671792245efeb812a76ab0fd1 (diff)
downloadbcfg2-592d406208fb387fc14b5ec2663804d9f6a22a49.tar.gz
bcfg2-592d406208fb387fc14b5ec2663804d9f6a22a49.tar.bz2
bcfg2-592d406208fb387fc14b5ec2663804d9f6a22a49.zip
Re-add daemonize support to the server
Fix some pylint errors Add better error handling for function calls Add mesh-mode support for sshbase git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1612 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugins/Cfg.py')
-rw-r--r--src/lib/Server/Plugins/Cfg.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/Server/Plugins/Cfg.py b/src/lib/Server/Plugins/Cfg.py
index c04c2e029..953401e7a 100644
--- a/src/lib/Server/Plugins/Cfg.py
+++ b/src/lib/Server/Plugins/Cfg.py
@@ -191,11 +191,13 @@ class ConfigFileEntry(object):
[entry.attrib.__setitem__(x,y) for (x,y) in self.metadata.iteritems()]
if self.paranoid:
entry.attrib['paranoid'] = 'true'
- try:
- entry.text = filedata
- except:
+ if entry.attrib['encoding'] == 'base64':
entry.text = b2a_base64(filedata)
- entry.attrib['encoding'] = 'base64'
+ else:
+ try:
+ entry.text = filedata
+ except:
+ syslog(LOG_ERR, "Failed to marshall file %s. Mark it as base64" % (entry.get('name')))
class Cfg(Plugin):
'''This generator in the configuration file repository for bcfg2'''