Opening a file for reading can raise IOError, so only catch that.

This commit is contained in:
Fred Drake 2001-05-11 18:47:54 +00:00
parent 1b7e079528
commit 776d39e2c7
1 changed files with 1 additions and 1 deletions

View File

@ -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()