community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1681498 - in /comdev/projects.apache.org/scripts/import: ./ parsecommittees.py
Date Sun, 24 May 2015 17:12:53 GMT
Author: hboutemy
Date: Sun May 24 17:12:53 2015
New Revision: 1681498

URL: http://svn.apache.org/r1681498
Log:
read PMD data in data_files from local checkout

Modified:
    comdev/projects.apache.org/scripts/import/   (props changed)
    comdev/projects.apache.org/scripts/import/parsecommittees.py

Propchange: comdev/projects.apache.org/scripts/import/
------------------------------------------------------------------------------
--- svn:externals (added)
+++ svn:externals Sun May 24 17:12:53 2015
@@ -0,0 +1 @@
+data_files https://svn.apache.org/repos/asf/infrastructure/site-tools/trunk/projects/data_files

Modified: comdev/projects.apache.org/scripts/import/parsecommittees.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/scripts/import/parsecommittees.py?rev=1681498&r1=1681497&r2=1681498&view=diff
==============================================================================
--- comdev/projects.apache.org/scripts/import/parsecommittees.py (original)
+++ comdev/projects.apache.org/scripts/import/parsecommittees.py Sun May 24 17:12:53 2015
@@ -56,16 +56,17 @@ xmldoc = minidom.parseString(urllib.requ
 itemlist = xmldoc.getElementsByTagName('location')
 for s in itemlist :
     url = s.childNodes[0].data
-    orig = url
-    if not url.startswith('http'):
-        url = "https://svn.apache.org/repos/asf/infrastructure/site-tools/trunk/projects/%s"
% url
     try:
-        rdfxml = ET.fromstring(urllib.request.urlopen(url).read())
+        if url.startswith('http'):
+            data = urllib.request.urlopen(url).read()
+        else:
+            data = open(url, 'r').read()
+            url = "https://svn.apache.org/repos/asf/infrastructure/site-tools/trunk/projects/%s"
% url
+        rdfxml = ET.fromstring(data)
         data = rdfxml[0]
         if data.tag == '{http://projects.apache.org/ns/asfext#}pmc':
             id = data.attrib['{http://www.w3.org/1999/02/22-rdf-syntax-ns#}about']
             pmcData[id] = url
-            print("    %s = %s" % (id, orig))
         else:
             print("WARN: unexpected content in " % url)
     except Exception as err:



Mime
View raw message