From e909ffb72dd931d40df78603cb425c749e56064d Mon Sep 17 00:00:00 2001 From: Robert Gogolok Date: Tue, 25 Dec 2007 02:24:04 +0000 Subject: 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 --- src/lib/Options.py | 4 ++-- 1 file 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: -- cgit v1.2.3-1-g7c22