From: Guido van Rossum Date: Tue, 10 Apr 2001 15:37:12 +0000 (+0000) Subject: Try an except: after an import into "except ImportError". X-Git-Tag: v2.1c1~126 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9c673f35d2f420ebcc8bc6e5c7f946722d4329aa;p=python Try an except: after an import into "except ImportError". This came out of SF bug #411881. Note that there's another unqualified except: still. --- diff --git a/Lib/zipfile.py b/Lib/zipfile.py index 5dedc1ba8c..6a7641f5b5 100644 --- a/Lib/zipfile.py +++ b/Lib/zipfile.py @@ -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",