]> granicus.if.org Git - python/commitdiff
Try an except: after an import into "except ImportError".
authorGuido van Rossum <guido@python.org>
Tue, 10 Apr 2001 15:37:12 +0000 (15:37 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 10 Apr 2001 15:37:12 +0000 (15:37 +0000)
This came out of SF bug #411881.

Note that there's another unqualified except: still.

Lib/zipfile.py

index 5dedc1ba8cb922352f52fc15d5301b104a1e582c..6a7641f5b53e4a84fe807b3331f446282e55360e 100644 (file)
@@ -7,7 +7,7 @@ import binascii
 
 try:
     import zlib # We may need its compression method
-except:
+except ImportError:
     zlib = None
 
 __all__ = ["BadZipfile", "error", "ZIP_STORED", "ZIP_DEFLATED", "is_zipfile",