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():
|
for mailcap in listmailcapfiles():
|
||||||
try:
|
try:
|
||||||
fp = open(mailcap, 'r')
|
fp = open(mailcap, 'r')
|
||||||
except:
|
except IOError:
|
||||||
continue
|
continue
|
||||||
morecaps = readmailcapfile(fp)
|
morecaps = readmailcapfile(fp)
|
||||||
fp.close()
|
fp.close()
|
||||||
|
|
Loading…
Reference in New Issue