Commit 3528fff1 authored by Boris Kocherov's avatar Boris Kocherov Committed by Romain Courteaud

correctly close open files during unzip

(cherry picked from commit 5032914)
parent b8b001d6
...@@ -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