community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1710502 - /comdev/projects.apache.org/scripts/cronjobs/parsecommitteeinfo.py
Date Mon, 26 Oct 2015 02:15:14 GMT
Author: sebb
Date: Mon Oct 26 02:15:14 2015
New Revision: 1710502

URL: http://svn.apache.org/viewvc?rev=1710502&view=rev
Log:
Allow for missing chair

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=1710502&r1=1710501&r2=1710502&view=diff
==============================================================================
--- comdev/projects.apache.org/scripts/cronjobs/parsecommitteeinfo.py (original)
+++ comdev/projects.apache.org/scripts/cronjobs/parsecommitteeinfo.py Mon Oct 26 02:15:14
2015
@@ -186,7 +186,10 @@ for group in sorted(committees, key=keyo
             committeeCount += 1
             committee={}
             committee['id'] = committeeId
-            committee['chair'] = ctte['chair']['nick']
+            try:
+                committee['chair'] = ctte['chair']['nick']
+            except TypeError: # no chair present
+                committee['chair'] = ''
             try:
                 committee['reporting'] = ctte['reporting']
             except KeyError:
@@ -226,10 +229,12 @@ for group in sorted(committees, key=keyo
             doap_pmc = ET.SubElement(doap, 'asfext:pmc')
             ET.SubElement(doap_pmc, 'asfext:name').text = fullName
             ET.SubElement(doap_pmc, 'homepage', attrib = { 'rdf:resource': homepage})
-            doap_chair = ET.SubElement(doap_pmc, 'asfext:chair')
-            doap_chair_person = ET.SubElement(doap_chair, 'foaf:Person')
-            ET.SubElement(doap_chair_person, 'foaf:nick').text = committee['chair']
-            ET.SubElement(doap_chair_person, 'foaf:name').text = people[committee['chair']]['name']
+            chair = committee['chair']
+            if chair:
+                doap_chair = ET.SubElement(doap_pmc, 'asfext:chair')
+                doap_chair_person = ET.SubElement(doap_chair, 'foaf:Person')
+                ET.SubElement(doap_chair_person, 'foaf:nick').text = committee['chair']
+                ET.SubElement(doap_chair_person, 'foaf:name').text = people[committee['chair']]['name']
             directory = "../../site/doap/%s" % committeeId
             if not os.path.exists(directory):
                 print("INFO: creating directory %s" % directory)



Mime
View raw message