aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/command_base.py
diff options
context:
space:
mode:
authormarmeladema <xademax@gmail.com>2019-12-12 00:14:32 +0000
committermarmeladema <xademax@gmail.com>2019-12-12 00:14:32 +0000
commite6a3a9774ad2f84cf6dbee531cf5e501076761b0 (patch)
tree131e25ada06f6dda32777031edb251265c417ad3 /python/servo/command_base.py
parentb3b72cb9e3f83609082793362385345d91e0be37 (diff)
downloadservo-e6a3a9774ad2f84cf6dbee531cf5e501076761b0.tar.gz
servo-e6a3a9774ad2f84cf6dbee531cf5e501076761b0.zip
Use filename instead of already opened file descriptor when calling ZipFile
This should fix #25251
Diffstat (limited to 'python/servo/command_base.py')
-rw-r--r--python/servo/command_base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py
index 86121b38fb0..15ec195fd51 100644
--- a/python/servo/command_base.py
+++ b/python/servo/command_base.py
@@ -112,7 +112,7 @@ def archive_deterministically(dir_to_archive, dest_archive, prepend_path=None):
temp_file = '{}.temp~'.format(dest_archive)
with os.fdopen(os.open(temp_file, os.O_WRONLY | os.O_CREAT, 0o644), 'wb') as out_file:
if dest_archive.endswith('.zip'):
- with zipfile.ZipFile(out_file, 'w', zipfile.ZIP_DEFLATED) as zip_file:
+ with zipfile.ZipFile(temp_file, 'w', zipfile.ZIP_DEFLATED) as zip_file:
for entry in file_list:
arcname = entry
if prepend_path is not None: