mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
Opening a file for reading can raise IOError, so only catch that.
This commit is contained in:
parent
1b7e079528
commit
776d39e2c7
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ def getcaps():
|
|||
for mailcap in listmailcapfiles():
|
||||
try:
|
||||
fp = open(mailcap, 'r')
|
||||
except:
|
||||
except IOError:
|
||||
continue
|
||||
morecaps = readmailcapfile(fp)
|
||||
fp.close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue