summaryrefslogtreecommitdiffstats
path: root/Lib/mailcap.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-05-11 18:47:54 (GMT)
committerFred Drake <fdrake@acm.org>2001-05-11 18:47:54 (GMT)
commit776d39e2c7786ddef5df12b35582069fc94f3979 (patch)
tree913f76ba4c3dc9cf02e8e64d9729a2d838f0dd85 /Lib/mailcap.py
parent1b7e0795285b81588a1f5957b7fc045bf384783e (diff)
downloadcpython-776d39e2c7786ddef5df12b35582069fc94f3979.zip
cpython-776d39e2c7786ddef5df12b35582069fc94f3979.tar.gz
cpython-776d39e2c7786ddef5df12b35582069fc94f3979.tar.bz2
Opening a file for reading can raise IOError, so only catch that.
Diffstat (limited to 'Lib/mailcap.py')
-rw-r--r--Lib/mailcap.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/mailcap.py b/Lib/mailcap.py
index 6f1c301..c864852 100644
--- a/Lib/mailcap.py
+++ b/Lib/mailcap.py
@@ -20,7 +20,7 @@ def getcaps():
for mailcap in listmailcapfiles():
try:
fp = open(mailcap, 'r')
- except:
+ except IOError:
continue
morecaps = readmailcapfile(fp)
fp.close()