Skip to content

Commit 2a3ed28

Browse files
inline_minify_webrepl.py: make deterministic
1 parent 0646acc commit 2a3ed28

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

webrepl/inline_minify_webrepl.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,9 @@ def inline_assets() -> None:
153153
)
154154
html = new_html
155155

156-
with gzip.open(out_path, "wt", encoding="utf-8") as gzip_file:
157-
gzip_file.write(html)
156+
with open(out_path, "wb") as f:
157+
with gzip.GzipFile(fileobj=f, mode="w", compresslevel=9, mtime=0) as gz:
158+
gz.write(html.encode("utf-8"))
158159

159160

160161
if __name__ == "__main__":

0 commit comments

Comments
 (0)