summaryrefslogtreecommitdiff
path: root/ez_setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'ez_setup.py')
-rw-r--r--ez_setup.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ez_setup.py b/ez_setup.py
index a6c3ef48..8d2199d5 100644
--- a/ez_setup.py
+++ b/ez_setup.py
@@ -78,8 +78,8 @@ def get_zip_class():
return self
def __exit__(self, type, value, traceback):
self.close()
- return zipfile.ZipFile if hasattr(zipfile.ZipFile, '__exit__') else \
- ContextualZipFile
+ zf_has_exit = hasattr(zipfile.ZipFile, '__exit__')
+ return zipfile.ZipFile if zf_has_exit else ContextualZipFile
@contextlib.contextmanager