You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by se...@apache.org on 2019/09/26 08:14:36 UTC

svn commit: r1867564 - /comdev/projects.apache.org/trunk/site/edit/save.py

Author: sebb
Date: Thu Sep 26 08:14:35 2019
New Revision: 1867564

URL: http://svn.apache.org/viewvc?rev=1867564&view=rev
Log:
Sync file write options with parseprojects

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

Modified: comdev/projects.apache.org/trunk/site/edit/save.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/trunk/site/edit/save.py?rev=1867564&r1=1867563&r2=1867564&view=diff
==============================================================================
--- comdev/projects.apache.org/trunk/site/edit/save.py (original)
+++ comdev/projects.apache.org/trunk/site/edit/save.py Thu Sep 26 08:14:35 2019
@@ -24,16 +24,13 @@ try:
             js[k] = form[k].value
         with open("../json/projects/%s" % f, "w") as out:
             json.dump(js, out, sort_keys=True, indent=0)
-            out.close()
 
         with open("../json/foundation/projects.json", "r") as g:
             gjson = json.loads(g.read())
-            g.close()
 
             gjson[project] = js
-            with open("../json/foundation/projects.json", "w") as og:
-                json.dump(gjson, og, sort_keys=True, indent=0)
-                og.close()
+            with open("../json/foundation/projects.json", "w", encoding='utf-8') as og:
+                json.dump(gjson, og, sort_keys=True, indent=0, ensure_ascii=False)
 
 
         text = """