Skip to content

Commit 655d52a

Browse files
committed
contrib: Specify wb mode when creating mac sdk
Fix the warning: ``` ./contrib/macdeploy/gen-sdk:84: FutureWarning: GzipFile was opened for writing, but this will change in future Python releases. Specify the mode argument for opening it for writing. ```
1 parent 14fe4db commit 655d52a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/macdeploy/gen-sdk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def run():
8181

8282
print("Creating output .tar.gz file...")
8383
with out_sdktgz_path.open("wb") as fp:
84-
with gzip.GzipFile(fileobj=fp, compresslevel=9, mtime=0) as gzf:
84+
with gzip.GzipFile(fileobj=fp, mode='wb', compresslevel=9, mtime=0) as gzf:
8585
with tarfile.open(mode="w", fileobj=gzf) as tarfp:
8686
print("Adding MacOSX SDK {} files...".format(sdk_version))
8787
tarfp_add_with_base_change(tarfp, sdk_dir, out_name)

0 commit comments

Comments
 (0)