From 776d39e2c7786ddef5df12b35582069fc94f3979 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Fri, 11 May 2001 18:47:54 +0000 Subject: [PATCH] Opening a file for reading can raise IOError, so only catch that. --- Lib/mailcap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/mailcap.py b/Lib/mailcap.py index 6f1c301c40a..c864852e064 100644 --- a/Lib/mailcap.py +++ b/Lib/mailcap.py @@ -20,7 +20,7 @@ def getcaps(): for mailcap in listmailcapfiles(): try: fp = open(mailcap, 'r') - except: + except IOError: continue morecaps = readmailcapfile(fp) fp.close()