mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 794891 - Format known-failures JSON files according to local conventions for now. (NPOTB, DONTBUILD)
This commit is contained in:
parent
2b5268c071
commit
37b4c0d887
@ -32,11 +32,17 @@ def dumpFailures(lines):
|
||||
if objstr == '{}\n':
|
||||
continue
|
||||
|
||||
# Avoid overly large diffs.
|
||||
if url.contains("/editing/"):
|
||||
sep = ':'
|
||||
else:
|
||||
sep = ': '
|
||||
|
||||
jsonpath = 'failures/' + url + '.json'
|
||||
files.append(jsonpath)
|
||||
ensuredir(jsonpath)
|
||||
obj = json.loads(objstr, object_pairs_hook=collections.OrderedDict)
|
||||
formattedobj = json.dumps(obj, indent=2, separators=(',', ': '))
|
||||
formattedobj = json.dumps(obj, indent=2, separators=(',', sep))
|
||||
fp = open(jsonpath, 'w')
|
||||
fp.write(formattedobj + '\n')
|
||||
fp.close()
|
||||
|
Loading…
Reference in New Issue
Block a user