From 32cf8f8268a20fe7f8257964128927305a3c9ffe Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Fri, 23 Mar 2012 12:34:51 -0500 Subject: Cfg: Fix logger calls Signed-off-by: Sol Jerome --- src/lib/Server/Plugins/Cfg.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/lib/Server/Plugins') diff --git a/src/lib/Server/Plugins/Cfg.py b/src/lib/Server/Plugins/Cfg.py index fafc6c638..ed08d454d 100644 --- a/src/lib/Server/Plugins/Cfg.py +++ b/src/lib/Server/Plugins/Cfg.py @@ -103,7 +103,7 @@ class CfgEntrySet(Bcfg2.Server.Plugin.EntrySet): def debug_log(self, message, flag=None): if (flag is None and self.debug_flag) or flag: - self.logger.error(message) + logger.error(message) def sort_by_specific(self, one, other): return cmp(one.specific, other.specific) @@ -228,15 +228,15 @@ class CfgEntrySet(Bcfg2.Server.Plugin.EntrySet): if 'text' in new_entry: name = self.build_filename(specific) if os.path.exists("%s.genshi" % name): - self.logger.error("Cfg: Unable to pull data for genshi types") + logger.error("Cfg: Unable to pull data for genshi types") raise Bcfg2.Server.Plugin.PluginExecutionError elif os.path.exists("%s.cheetah" % name): - self.logger.error("Cfg: Unable to pull data for cheetah types") + logger.error("Cfg: Unable to pull data for cheetah types") raise Bcfg2.Server.Plugin.PluginExecutionError try: etext = new_entry['text'].encode(self.encoding) except: - self.logger.error("Cfg: Cannot encode content of %s as %s" % (name, self.encoding)) + logger.error("Cfg: Cannot encode content of %s as %s" % (name, self.encoding)) raise Bcfg2.Server.Plugin.PluginExecutionError open(name, 'w').write(etext) self.debug_log("Wrote file %s" % name, flag=log) @@ -245,11 +245,11 @@ class CfgEntrySet(Bcfg2.Server.Plugin.EntrySet): if badattr: # check for info files and inform user of their removal if os.path.exists(self.path + "/:info"): - self.logger.info("Removing :info file and replacing with " + logger.info("Removing :info file and replacing with " "info.xml") os.remove(self.path + "/:info") if os.path.exists(self.path + "/info"): - self.logger.info("Removing info file and replacing with " + logger.info("Removing info file and replacing with " "info.xml") os.remove(self.path + "/info") metadata_updates = {} -- cgit v1.2.3-1-g7c22