diff options
author | marmeladema <xademax@gmail.com> | 2019-10-28 23:51:42 +0000 |
---|---|---|
committer | marmeladema <xademax@gmail.com> | 2019-12-10 16:10:58 +0000 |
commit | 267eaad4ebcc26337956ae298babb98694554a1c (patch) | |
tree | a56200340bf38e9c7f3461e90aec1af7ae66c3b6 /python | |
parent | 3f48f2863cf21e3584c908d653e15521aae3ed5c (diff) | |
download | servo-267eaad4ebcc26337956ae298babb98694554a1c.tar.gz servo-267eaad4ebcc26337956ae298babb98694554a1c.zip |
Properly open file as 'wb' in archive_deterministically
Diffstat (limited to 'python')
-rw-r--r-- | python/servo/command_base.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py index 7184010442c..9dfa6795d12 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -110,9 +110,9 @@ def archive_deterministically(dir_to_archive, dest_archive, prepend_path=None): # packaging (in case of exceptional situations like running out of disk space). # TODO do this in a temporary folder after #11983 is fixed temp_file = '{}.temp~'.format(dest_archive) - with os.fdopen(os.open(temp_file, os.O_WRONLY | os.O_CREAT, 0o644), 'w') as out_file: + 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(temp_file, 'w', zipfile.ZIP_DEFLATED) as zip_file: + with zipfile.ZipFile(out_file, 'w', zipfile.ZIP_DEFLATED) as zip_file: for entry in file_list: arcname = entry if prepend_path is not None: |