No bug - fix client.py update_nss on python3. r=firefox-build-system-reviewers,mhentges,bbeurdouche

We're mixing str and bytes in toggle_trailing_blank_line which can only
end in sadness.

Differential Revision: https://phabricator.services.mozilla.com/D114372
This commit is contained in:
Julien Cristau 2021-05-05 16:59:09 +00:00
parent 0f1d2e2ebe
commit faed108cb8

View File

@ -62,7 +62,7 @@ def do_hg_replace(dir, repository, tag, exclusions, hg):
def toggle_trailing_blank_line(depname):
"""If the trailing line is empty, then we'll delete it.
Otherwise we'll add a blank line."""
lines = open(depname, "r").readlines()
lines = open(depname, "rb").readlines()
if not lines:
print("unexpected short file", file=sys.stderr)
return