community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1673025 - /comdev/projects.apache.org/site/edit/save.py
Date Sun, 12 Apr 2015 16:20:03 GMT
Author: hboutemy
Date: Sun Apr 12 16:20:03 2015
New Revision: 1673025

URL: http://svn.apache.org/r1673025
Log:
keep projects sorted and indented on save

Modified:
    comdev/projects.apache.org/site/edit/save.py

Modified: comdev/projects.apache.org/site/edit/save.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/site/edit/save.py?rev=1673025&r1=1673024&r2=1673025&view=diff
==============================================================================
--- comdev/projects.apache.org/site/edit/save.py (original)
+++ comdev/projects.apache.org/site/edit/save.py Sun Apr 12 16:20:03 2015
@@ -24,7 +24,7 @@ try:
         for k in form:
             js[k] = form[k].value
         with open("../json/projects/%s" % f, "w") as out:
-            out.write(json.dumps(js))
+            out.write(json.dumps(js, indent=0))
             out.close()
 
         with open("../json/foundation/projects.json", "r") as g:
@@ -33,7 +33,7 @@ try:
 
             gjson[project] = js
             with open("../json/foundation/projects.json", "w") as og:
-                og.write(json.dumps(gjson))
+                og.write(json.dumps(gjson, sort_keys=True, indent=0))
                 og.close()
 
 



Mime
View raw message