[Libreoffice-commits] dev-tools.git: scripts/esc-mentoring.py

jan iversen jani at documentfoundation.org
Wed Apr 13 06:16:05 UTC 2016


 scripts/esc-mentoring.py |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit bc1817b5dec6d2f4ea4baac042f418a3cd7e3b21
Author: jan iversen <jani at documentfoundation.org>
Date:   Wed Apr 13 08:14:49 2016 +0200

    esc-mentoring, nice formatting of json objects.
    
    Using "indent=4", causes json.dump to use newlines.

diff --git a/scripts/esc-mentoring.py b/scripts/esc-mentoring.py
index 69ff84c..ef91f9c 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))
 


More information about the Libreoffice-commits mailing list