Bug 794891 - Format known-failures JSON files according to local conventions for now. (NPOTB, DONTBUILD)

This commit is contained in:
Ms2ger 2012-09-30 09:52:06 +02:00
Родитель 2b5268c071
Коммит 37b4c0d887
1 изменённых файлов: 7 добавлений и 1 удалений

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

@ -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()