aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2014-05-17 20:24:17 -0400
committerJason R. Coombs <jaraco@jaraco.com>2014-05-17 20:24:17 -0400
commit20ee765db785160ee8cb3ec682a155062c024543 (patch)
tree9bce388cf05fce4202c16f891506744426e36445
parent365ca3bd6b4353a8caec406bc2aaec73650ec554 (diff)
downloadexternal_python_setuptools-20ee765db785160ee8cb3ec682a155062c024543.tar.gz
external_python_setuptools-20ee765db785160ee8cb3ec682a155062c024543.tar.bz2
external_python_setuptools-20ee765db785160ee8cb3ec682a155062c024543.zip
Refactor test
-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