From 762358a3647caa563ffede79073a0ee8edb64ca9 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Mon, 28 Nov 2005 21:39:04 +0000 Subject: remove debug message 2005/11/28 14:30:10-06:00 anl.gov!desai implement auto-base64 encoding of config files (Logical change 1.368) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1550 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Server/Plugins/Cfg.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/lib/Server/Plugins/Cfg.py b/src/lib/Server/Plugins/Cfg.py index ea41791a9..c04c2e029 100644 --- a/src/lib/Server/Plugins/Cfg.py +++ b/src/lib/Server/Plugins/Cfg.py @@ -158,8 +158,6 @@ class ConfigFileEntry(object): self.deltas.remove(entry) syslog(LOG_INFO, "Cfg: Entry deletion completed") elif action in ['changed', 'exists', 'created']: - if action == 'changed': - syslog(LOG_INFO, "Cfg: File %s changed" % event.filename) [entry.HandleEvent(event) for entry in entries] else: syslog(LOG_ERR, "Cfg: Unhandled Action %s for file %s" % (action, event.filename)) @@ -193,10 +191,11 @@ class ConfigFileEntry(object): [entry.attrib.__setitem__(x,y) for (x,y) in self.metadata.iteritems()] if self.paranoid: entry.attrib['paranoid'] = 'true' - if self.metadata['encoding'] == 'base64': - entry.text = b2a_base64(filedata) - else: + try: entry.text = filedata + except: + entry.text = b2a_base64(filedata) + entry.attrib['encoding'] = 'base64' class Cfg(Plugin): '''This generator in the configuration file repository for bcfg2''' -- cgit v1.2.3-1-g7c22