bug 1416891 - Open output files in binary mode for GENERATED_FILES. r=nalexander,gps

The script behind GENERATED_FILES currently opens output files in text mode,
which means that they wind up with CRLF line endings on Windows. With
switching updater.ini to use LOCALIZED_GENERATED_FILES, this means that it
will wind up with different line endings than it currently has.

Changing this to use binary format means that we'll have LF line endings
everywhere, which shouldn't harm anything on Windows as most of our generated
files are source files anyway.

MozReview-Commit-ID: 7rTUDtVGL82

--HG--
extra : rebase_source : 53a604c225477ad02e439b7b9ace587aefd0785a
This commit is contained in:
Ted Mielczarek 2017-11-30 11:32:29 -05:00
Родитель 0d6c1e30f1
Коммит efd8100ef0
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -64,7 +64,7 @@ def main(argv):
ret = 1
try:
with FileAvoidWrite(args.output_file) as output:
with FileAvoidWrite(args.output_file, mode='rb') as output:
ret = module.__dict__[method](output, *args.additional_arguments, **kwargs)
# The following values indicate a statement of success:
# - a set() (see below)