summaryrefslogtreecommitdiffstats
path: root/src/lib/Settings.py
diff options
context:
space:
mode:
authorRobert Gogolok <gogo@cs.uni-sb.de>2007-12-30 21:45:40 +0000
committerRobert Gogolok <gogo@cs.uni-sb.de>2007-12-30 21:45:40 +0000
commit340c282ef6232a993f5461bf51ccb410b1f1355f (patch)
treece917caae633e0c324dc41771025d4d80416fb87 /src/lib/Settings.py
parenta04628e619a753078cfb4f3a8d1739837e65be86 (diff)
downloadbcfg2-340c282ef6232a993f5461bf51ccb410b1f1355f.tar.gz
bcfg2-340c282ef6232a993f5461bf51ccb410b1f1355f.tar.bz2
bcfg2-340c282ef6232a993f5461bf51ccb410b1f1355f.zip
add SENDMAIL_PATH
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4137 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Settings.py')
-rw-r--r--src/lib/Settings.py28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/lib/Settings.py b/src/lib/Settings.py
index 561611414..44ba3b849 100644
--- a/src/lib/Settings.py
+++ b/src/lib/Settings.py
@@ -16,9 +16,10 @@ locations = {'communication': [('COMMUNICATION_PROTOCOL', 'protocol'),
('SERVER_GENERATORS','generators'),
('SERVER_REPOSITORY', 'repository'),
('SERVER_STRUCTURES','structures'),
- ('SERVER_SVN', 'svn'),
+ ('SERVER_SVN', 'svn')],
'components': [('COMPONENTS_BCFG2', 'bcfg2'),
- ('COMPONENTS_BCFG2_STATIC', 'bcfg2')]}
+ ('COMPONENTS_BCFG2_STATIC', 'bcfg2')],
+ 'statistics': [('SENDMAIL_PATH', 'sendmai;')]}
cookers = {'COMPONENTS_BCFG2_STATIC': lambda x:True,
'SERVER_GENERATORS': lambda x:x.replace(' ','').split(','),
@@ -43,6 +44,7 @@ class Settings(object):
self.COMPONENTS_BCFG2 = (socket.gethostname(), 0)
self.COMPONENTS_BCFG2_STATIC = False
+ self.SENDMAIL_PATH = '/usr/sbin/sendmail'
def __getattr__(self, name):
print "name = %s\n" % name
@@ -76,16 +78,16 @@ class Settings(object):
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)))
- else:
- setattr(self, key, cfp.get(section, location))
- except:
- pass
+ 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)))
+ else:
+ setattr(self, key, cfp.get(section, location))
+ except:
+ pass
settings = Settings()