Skip to content

Commit a5e6fec

Browse files
committed
split binary from text portion
1 parent e7d15f7 commit a5e6fec

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

python/private/stage2_bootstrap_template.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ def get_build_data(self):
7171
path = os.path.normpath(path)
7272
try:
7373
# Use utf-8-sig to handle Windows BOM
74-
with open(path, encoding="utf-8-sig") as fp:
75-
return fp.read()
74+
with open(path, 'rb') as fp:
75+
data = fp.read()
76+
return data.decode('utf-8-sig')
7677
except Exception as exc:
7778
if hasattr(exc, "add_note"):
7879
exc.add_note(f"runfiles lookup path: {rlocation_path}")

0 commit comments

Comments
 (0)