summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRobert Gogolok <gogo@cs.uni-sb.de>2007-12-25 02:24:04 +0000
committerRobert Gogolok <gogo@cs.uni-sb.de>2007-12-25 02:24:04 +0000
commite909ffb72dd931d40df78603cb425c749e56064d (patch)
tree1fd2efbb149c0f131704f57ee841fdcad1363f90 /src
parentbbf92f4e66c2d17a124446203fca58fae0661b6e (diff)
downloadbcfg2-e909ffb72dd931d40df78603cb425c749e56064d.tar.gz
bcfg2-e909ffb72dd931d40df78603cb425c749e56064d.tar.bz2
bcfg2-e909ffb72dd931d40df78603cb425c749e56064d.zip
ConfigParser.read(filenames) will not raise an exception, use ConfigParser.readfp(fp) instead
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4111 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Options.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/Options.py b/src/lib/Options.py
index ac3d1d681..4c97b1ca5 100644
--- a/src/lib/Options.py
+++ b/src/lib/Options.py
@@ -55,9 +55,9 @@ class BasicOptionParser:
if self.configfile:
cf = ConfigParser.ConfigParser()
try:
- cf.read(self.configfile)
+ cf.readfp(open(self.configfile))
except Exception, e:
- print "Failed to read configfile: %s\n%s" % (self.configfile, e)
+ print "Failed to read configfile: %s\n%s\n" % (self.configfile, e)
raise SystemExit, 1
for key, (option, envvar, cfpath, default, boolean) in self.optionspec.iteritems():
if self.dogetopt: