]> granicus.if.org Git - python/commitdiff
Opening a file for reading can raise IOError, so only catch that.
authorFred Drake <fdrake@acm.org>
Fri, 11 May 2001 18:47:54 +0000 (18:47 +0000)
committerFred Drake <fdrake@acm.org>
Fri, 11 May 2001 18:47:54 +0000 (18:47 +0000)
Lib/mailcap.py

index 6f1c301c40ab2cbb8ca04a4f70e662d2c29476bb..c864852e06474a51d2953f2e212848f36131e3c5 100644 (file)
@@ -20,7 +20,7 @@ def getcaps():
     for mailcap in listmailcapfiles():
         try:
             fp = open(mailcap, 'r')
-        except:
+        except IOError:
             continue
         morecaps = readmailcapfile(fp)
         fp.close()