diff options
author | Robert Gogolok <gogo@cs.uni-sb.de> | 2007-12-25 02:24:04 +0000 |
---|---|---|
committer | Robert Gogolok <gogo@cs.uni-sb.de> | 2007-12-25 02:24:04 +0000 |
commit | e909ffb72dd931d40df78603cb425c749e56064d (patch) | |
tree | 1fd2efbb149c0f131704f57ee841fdcad1363f90 /src | |
parent | bbf92f4e66c2d17a124446203fca58fae0661b6e (diff) | |
download | bcfg2-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.py | 4 |
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: |