Commits

Jason R. Coombs committed 7954605

Refactor test

Comments (0)

Files changed (1)

             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