Commit 50329148 authored by Boris Kocherov's avatar Boris Kocherov

correctly close open files during unzip

parent 16cc6ead
...@@ -132,9 +132,8 @@ def zipTree(destination, *tree_path_list): ...@@ -132,9 +132,8 @@ def zipTree(destination, *tree_path_list):
return destination return destination
def unzip(source, destination): def unzip(source, destination):
zipfile = ZipFile(source) with ZipFile(source) as zipfile:
zipfile.extractall(destination) zipfile.extractall(destination)
zipfile.close()
def parseContentType(content_type): def parseContentType(content_type):
"""Parses `text/plain;charset="utf-8"` to a mimetools.Message object. """Parses `text/plain;charset="utf-8"` to a mimetools.Message object.
......
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