diff options
author | Fred Drake <fdrake@acm.org> | 2001-05-11 18:47:54 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-05-11 18:47:54 (GMT) |
commit | 776d39e2c7786ddef5df12b35582069fc94f3979 (patch) | |
tree | 913f76ba4c3dc9cf02e8e64d9729a2d838f0dd85 /Lib/mailcap.py | |
parent | 1b7e0795285b81588a1f5957b7fc045bf384783e (diff) | |
download | cpython-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.py | 2 |
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() |