mirror of https://github.com/python/cpython.git
Opening a file for reading can raise IOError, so only catch that.
This commit is contained in:
parent
1b7e079528
commit
776d39e2c7
|
@ -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…
Reference in New Issue