Fix scripts/extract.py failing on Windows
Script was opening file in text mode and failing with:
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position
299: character maps to <undefined>
Fixed by opening file in binary mode.
Change-Id: I4db670438164116d9a41eb9e7e725868037c17fc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85161
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
diff --git a/scripts/extract.py b/scripts/extract.py
index 1c83afe..ed263f4 100644
--- a/scripts/extract.py
+++ b/scripts/extract.py
@@ -97,7 +97,7 @@
# Skip archives that weren't downloaded.
return 0
- with open(archive) as f:
+ with open(archive, 'rb') as f:
sha256 = hashlib.sha256()
while True:
chunk = f.read(1024 * 1024)