community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1704016 - /comdev/projects.apache.org/scripts/cronjobs/parsecommitters.py
Date Sat, 19 Sep 2015 13:15:27 GMT
Author: sebb
Date: Sat Sep 19 13:15:26 2015
New Revision: 1704016

URL: http://svn.apache.org/viewvc?rev=1704016&view=rev
Log:
Write json direct to file instead of converting to string first

Modified:
    comdev/projects.apache.org/scripts/cronjobs/parsecommitters.py

Modified: comdev/projects.apache.org/scripts/cronjobs/parsecommitters.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/scripts/cronjobs/parsecommitters.py?rev=1704016&r1=1704015&r2=1704016&view=diff
==============================================================================
--- comdev/projects.apache.org/scripts/cronjobs/parsecommitters.py (original)
+++ comdev/projects.apache.org/scripts/cronjobs/parsecommitters.py Sat Sep 19 13:15:26 2015
@@ -43,17 +43,17 @@ for committer in re.findall(r"<tr>([\S\s
 
 print("Writing people.json")
 with open("../../site/json/foundation/people.json", "w") as f:
-    f.write(json.dumps(people, sort_keys=True, indent=0))
+    json.dump(people, f, sort_keys=True, indent=0)
     f.close()
 
 print("Writing people_name.json")
 with open("../../site/json/foundation/people_name.json", "w") as f:
-    f.write(json.dumps(people_name, sort_keys=True, indent=0))
+    json.dump(people_name, f, sort_keys=True, indent=0)
     f.close()
 
 print("Writing groups.json")
 with open("../../site/json/foundation/groups.json", "w") as f:
-    f.write(json.dumps(groups, sort_keys=True, indent=0))
+    json.dump(groups, f, sort_keys=True, indent=0)
     f.close()
 
 print("All done!")
\ No newline at end of file



Mime
View raw message