summaryrefslogtreecommitdiffstats
path: root/Lib/ConfigParser.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1999-10-04 18:11:56 (GMT)
committerFred Drake <fdrake@acm.org>1999-10-04 18:11:56 (GMT)
commit2438a485c84bd52a72ae11502bd21e89f1048be6 (patch)
tree80aded52560f32de3e9ec34d1839c8f8f19bb9cf /Lib/ConfigParser.py
parentef93095adb63fa601f8f9be75e62bca082363a82 (diff)
downloadcpython-2438a485c84bd52a72ae11502bd21e89f1048be6.zip
cpython-2438a485c84bd52a72ae11502bd21e89f1048be6.tar.gz
cpython-2438a485c84bd52a72ae11502bd21e89f1048be6.tar.bz2
ConfigParser.read(): Don't mask IOError exceptions.
Diffstat (limited to 'Lib/ConfigParser.py')
-rw-r--r--Lib/ConfigParser.py8
1 files 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.