зеркало из https://github.com/mozilla/gecko-dev.git
Bug 794891 - Format known-failures JSON files according to local conventions for now. (NPOTB, DONTBUILD)
This commit is contained in:
Родитель
2b5268c071
Коммит
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()
|
||||
|
|
Загрузка…
Ссылка в новой задаче