Bug 1293868 - Write mozinfo.json deterministically; r=glandium

And with indentation so it is easier for humans to read.

MozReview-Commit-ID: Kkd6vmfLNUf

--HG--
extra : rebase_source : 9f2b4ad2223f361dd6dd1ec9cdda71bd5a8560e3
This commit is contained in:
Gregory Szorc 2016-08-09 19:11:54 -07:00
Родитель aa229473b7
Коммит 46ad65f8b8
1 изменённых файлов: 3 добавлений и 4 удалений

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

@ -155,7 +155,6 @@ def write_mozinfo(file, config, env=os.environ):
"""
build_conf = build_dict(config, env)
if isinstance(file, basestring):
with open(file, "w") as f:
json.dump(build_conf, f)
else:
json.dump(build_conf, file)
file = open(file, 'wb')
json.dump(build_conf, file, sort_keys=True, indent=4)