community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1790682 - /comdev/reporter.apache.org/trunk/scripts/parsepmcs.py
Date Sat, 08 Apr 2017 13:31:38 GMT
Author: sebb
Date: Sat Apr  8 13:31:37 2017
New Revision: 1790682

URL: http://svn.apache.org/viewvc?rev=1790682&view=rev
Log:
Allow for references to missing people from LDAP groups

Modified:
    comdev/reporter.apache.org/trunk/scripts/parsepmcs.py

Modified: comdev/reporter.apache.org/trunk/scripts/parsepmcs.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/scripts/parsepmcs.py?rev=1790682&r1=1790681&r2=1790682&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/scripts/parsepmcs.py (original)
+++ comdev/reporter.apache.org/trunk/scripts/parsepmcs.py Sat Apr  8 13:31:37 2017
@@ -77,7 +77,11 @@ newgroups = []
 newpmcs = []
 
 def updateProjects(stamp, group, cid):
-    cname = ldappeople[cid]['name']
+    if cid in ldappeople:
+        cname = ldappeople[cid]['name']
+    else:
+        print("ERROR: LDAP unix group '%s' has entry '%s' not in people LDAP group" % (group,
cid), file=sys.stderr)
+        cname = '(Missing from LDAP people)'
     now = stamp
     if not group in projects:
         print("New unx group %s" % group)
@@ -93,7 +97,11 @@ def updateProjects(stamp, group, cid):
         projects[group][cid] = [cname, projects[group][cid][1], stamp]
 
 def updateCommittees(stamp, group, cid):
-    cname = ldappeople[cid]['name']
+    if cid in ldappeople:
+        cname = ldappeople[cid]['name']
+    else:
+        print("ERROR: LDAP committee group '%s' has entry '%s' not in people LDAP group"
% (group, cid), file=sys.stderr)
+        cname = '(Missing from LDAP people)'
     now = stamp
     if not group in pmcs: # a new project
         print("New pmc group %s" % group)



Mime
View raw message