From: Fred Drake Date: Mon, 4 Oct 1999 18:11:56 +0000 (+0000) Subject: ConfigParser.read(): Don't mask IOError exceptions. X-Git-Tag: v1.6a1~838 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2438a485c84bd52a72ae11502bd21e89f1048be6;p=python ConfigParser.read(): Don't mask IOError exceptions. --- diff --git a/Lib/ConfigParser.py b/Lib/ConfigParser.py index 4dbe606b03..2d0e0c6bd1 100644 --- a/Lib/ConfigParser.py +++ b/Lib/ConfigParser.py @@ -170,11 +170,9 @@ class ConfigParser: if type(filenames) is type(''): filenames = [filenames] for file in filenames: - try: - fp = open(file, 'r') - self.__read(fp) - except IOError: - pass + fp = open(file) + self.__read(fp) + fp.close() def get(self, section, option, raw=0, vars=None): """Get an option value for a given section.