Skip to content
Permalink
Browse files

Use filename instead of already opened file descriptor when calling Z…

…ipFile

This should fix #25251
  • Loading branch information
marmeladema committed Dec 12, 2019
1 parent b3b72cb commit e6a3a9774ad2f84cf6dbee531cf5e501076761b0
Showing with 1 addition and 1 deletion.
  1. +1 −1 python/servo/command_base.py
@@ -112,7 +112,7 @@ def reset(tarinfo):
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:

0 comments on commit e6a3a97

Please sign in to comment.
You can’t perform that action at this time.