From 2438a485c84bd52a72ae11502bd21e89f1048be6 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Mon, 4 Oct 1999 18:11:56 +0000 Subject: ConfigParser.read(): Don't mask IOError exceptions. --- Lib/ConfigParser.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Lib/ConfigParser.py b/Lib/ConfigParser.py index 4dbe606..2d0e0c6 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. -- cgit v0.12