community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1672960 - /comdev/projects.apache.org/scripts/import/rdfparse.py
Date Sun, 12 Apr 2015 01:35:27 GMT
Author: hboutemy
Date: Sun Apr 12 01:35:27 2015
New Revision: 1672960

URL: http://svn.apache.org/r1672960
Log:
fixed directory issues when writing prname.json

Modified:
    comdev/projects.apache.org/scripts/import/rdfparse.py

Modified: comdev/projects.apache.org/scripts/import/rdfparse.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/scripts/import/rdfparse.py?rev=1672960&r1=1672959&r2=1672960&view=diff
==============================================================================
--- comdev/projects.apache.org/scripts/import/rdfparse.py (original)
+++ comdev/projects.apache.org/scripts/import/rdfparse.py Sun Apr 12 01:35:27 2015
@@ -73,16 +73,16 @@ for s in itemlist :
                         add[e] = pjson[k][e]
                     pjson[k] = None
                     
+            projects[prname] = pjson
             for e in add:
                 pjson[e] = add[e]
             if not os.path.isfile("../../site/json/projects/%s.json" % prname):
-                projects[prname] = pjson
                 print("Writing %s.json..." % prname)
-                with open ("../site/json/projects/%s.json" % prname, "w") as f:
+                with open ("../../site/json/projects/%s.json" % prname, "w") as f:
                     f.write(json.dumps(pjson, sort_keys=True, indent=0))
                     f.close()
     except Exception as err:
-        print("Error: %s" % err)
+        print("Error when readind " + url + ": %s" % err)
         
 with open ("../../site/json/foundation/projects.json", "w") as f:
     f.write(json.dumps(projects, sort_keys=True, indent=0))



Mime
View raw message