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>
This commit is contained in:
Antonio Maiorano 2022-03-29 16:30:43 +00:00 committed by Dawn LUCI CQ
parent dad225a896
commit 123761f40f
1 changed files with 1 additions and 1 deletions

View File

@ -97,7 +97,7 @@ def main(args):
# 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)