From 6064a7affcbfaa2b1502a77f48b73f48a58111dd Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Sun, 30 Dec 2007 21:50:40 +0000 Subject: Fix parsing problem git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4139 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Settings.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/lib/Settings.py b/src/lib/Settings.py index f5092d221..33a7a0970 100644 --- a/src/lib/Settings.py +++ b/src/lib/Settings.py @@ -19,7 +19,7 @@ locations = {'communication': [('COMMUNICATION_PROTOCOL', 'protocol'), ('SERVER_SVN', 'svn')], 'components': [('COMPONENTS_BCFG2', 'bcfg2'), ('COMPONENTS_BCFG2_STATIC', 'bcfg2')], - 'statistics': [('SENDMAIL_PATH', 'sendmai;')]} + 'statistics': [('SENDMAIL_PATH', 'sendmail')]} cookers = {'COMPONENTS_BCFG2_STATIC': lambda x:True, 'SERVER_GENERATORS': lambda x:x.replace(' ','').split(','), @@ -58,10 +58,10 @@ class Settings(object): # set config file if not filename: - logger.info("No config file given. Trying default config file '%s'." % self.CONFIG_FILE) + logger.info("No config file given. Trying default config file '%s'." % self.CONFIG_FILE) else: - logger.debug("Trying user specified config file '%s'." % filename) - self.CONFIG_FILE = filename + logger.debug("Trying user specified config file '%s'." % filename) + self.CONFIG_FILE = filename # open config file try: @@ -75,18 +75,18 @@ class Settings(object): try: cfp.readfp(cf) except Exception, e: - logger.error("Content of config file '%s' is not valid. Correct it!\n%s\n" % (self.CONFIG_FILE, e)) - raise SystemExit, 1 + logger.error("Content of config file '%s' is not valid. Correct it!\n%s\n" % (self.CONFIG_FILE, e)) + raise SystemExit, 1 for section in locations: if cfp.has_section(section): for key, location in locations[section]: try: if key in cookers: - setattr(self, key, cookers[key](cfp.get(section, - location))) + setattr(self, key, cookers[key](cfp.get(section, + location))) else: - setattr(self, key, cfp.get(section, location)) + setattr(self, key, cfp.get(section, location)) except: pass -- cgit v1.2.3-1-g7c22