community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1723308 - /comdev/projects.apache.org/scripts/cronjobs/parsecommitteeinfo.py
Date Wed, 06 Jan 2016 12:56:20 GMT
Author: sebb
Date: Wed Jan  6 12:56:20 2016
New Revision: 1723308

URL: http://svn.apache.org/viewvc?rev=1723308&view=rev
Log:
Detect syntax error in rdf:about for PMC RDFs

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

Modified: comdev/projects.apache.org/scripts/cronjobs/parsecommitteeinfo.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/scripts/cronjobs/parsecommitteeinfo.py?rev=1723308&r1=1723307&r2=1723308&view=diff
==============================================================================
--- comdev/projects.apache.org/scripts/cronjobs/parsecommitteeinfo.py (original)
+++ comdev/projects.apache.org/scripts/cronjobs/parsecommitteeinfo.py Wed Jan  6 12:56:20
2016
@@ -84,7 +84,7 @@ pmcs = {}
 pmcDataUrls = {} # id -> url
 
 # get PMC Data from /data/committees.xml
-print("reading PMC Data (/data/committees.xml)")
+print("Reading PMC Data (/data/committees.xml)")
 with open("../../data/committees.xml", "r") as f:
     xmldoc = minidom.parseString(f.read())
     f.close()
@@ -101,6 +101,8 @@ for loc in xmldoc.getElementsByTagName('
         rdfxml = ET.fromstring(rdf)
         rdfdata = rdfxml[0]
         committeeId = rdfdata.attrib['{http://www.w3.org/1999/02/22-rdf-syntax-ns#}about']
+        if re.match("https?:", committeeId):
+            print("ERROR: unexpected rdf:about value '%s' in '%s'" % (committeeId, url),
file=sys.stderr)
         pmcDataUrls[committeeId] = url
 
         # transform PMC data RDF to json



Mime
View raw message