We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0231b6d commit a143717Copy full SHA for a143717
Tools/scripts/freeze_modules.py
@@ -329,10 +329,10 @@ def _iter_sources(modules):
329
# generic helpers
330
331
def _get_checksum(filename):
332
- with open(filename) as infile:
333
- text = infile.read()
+ with open(filename, "rb") as infile:
+ contents = infile.read()
334
m = hashlib.sha256()
335
- m.update(text.encode('utf8'))
+ m.update(contents)
336
return m.hexdigest()
337
338
@@ -489,7 +489,7 @@ def regen_manifest(modules):
489
modlines.append(' '.join(row).rstrip())
490
491
print(f'# Updating {os.path.relpath(MANIFEST)}')
492
- with open(MANIFEST, 'w') as outfile:
+ with open(MANIFEST, 'w', encoding="utf-8") as outfile:
493
lines = (l + '\n' for l in modlines)
494
outfile.writelines(lines)
495
0 commit comments