Commit 20ee765d authored by Jason R. Coombs's avatar Jason R. Coombs

Refactor test

parent 365ca3bd
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment