diff options
author | jan iversen <jani@documentfoundation.org> | 2016-04-13 08:14:49 +0200 |
---|---|---|
committer | jan iversen <jani@documentfoundation.org> | 2016-04-13 08:14:49 +0200 |
commit | bc1817b5dec6d2f4ea4baac042f418a3cd7e3b21 (patch) | |
tree | a651ac70608a617b7f8e31ca7c6c0946b3c0e87c /scripts | |
parent | 2d2ae6fd1be631f718549d385479d8388f6c308d (diff) |
esc-mentoring, nice formatting of json objects.
Using "indent=4", causes json.dump to use newlines.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/esc-mentoring.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/esc-mentoring.py b/scripts/esc-mentoring.py index 69ff84c3..ef91f9c7 100755 --- a/scripts/esc-mentoring.py +++ b/scripts/esc-mentoring.py @@ -275,7 +275,7 @@ def DAY_report(runMsg, easyHacks, gerritOpen, gerritContributor) : # Day report looks 8 days back cDate = datetime.date.today() - datetime.timedelta(days=8) - print("*** new easyHacks (verify who created it:") + print("*** new easyHacks (verify who created it):") for key, row in easyHacks.items(): if row['created'] >= cDate : print(' ', end='') @@ -317,7 +317,7 @@ def DAY_report(runMsg, easyHacks, gerritOpen, gerritContributor) : if row['comments'] >= 5 : bugs.append(optimize_bug(get_bug(key))) with open('bz_comments.json', 'w') as f: - json.dump(bugs, f, ensure_ascii=False) + json.dump(bugs, f, ensure_ascii=False, indent=4, sort_keys=True) xTot = len(bugs) print(' wrote {} entries to bz_comments.json'.format(xTot)) |