Closed Bug 1293868 Opened 8 years ago Closed 8 years ago

Write mozinfo.json deterministically

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox51 fixed)

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: gps, Assigned: gps)

Details

Attachments

(1 file)

Patch forthcoming.
Comment on attachment 8779590 [details]
Bug 1293868 - Write mozinfo.json deterministically;

https://reviewboard.mozilla.org/r/70544/#review68580

::: python/mozbuild/mozbuild/mozinfo.py:159
(Diff revision 1)
> -            json.dump(build_conf, f)
> +            json.dump(build_conf, f, sort_keys=True, indent=4)
>      else:
> -        json.dump(build_conf, file)
> +        json.dump(build_conf, file, sort_keys=True, indent=4)

It would be nicer if this wasn't repeated.

How about

if isinstance(file, basestring):
    file = open(file, 'wb')

json.dump(build_conf, file, sort_keys=True, indent=4)

?
Attachment #8779590 - Flags: review?(mh+mozilla) → review+
Pushed by gszorc@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/928b859ecc50
Write mozinfo.json deterministically; r=glandium
https://hg.mozilla.org/mozilla-central/rev/928b859ecc50
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: