From b3104533ff4b6d8667dff2d9ebe170ae9301fce8 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Mon, 12 Sep 2011 17:27:46 -0400 Subject: [PATCH] Handle new 'Proxy' lulAffiliation a bit more gracefully In general, if we don't have an explicit profile, just return. Signed-off-by: Dan Scott Signed-off-by: Dan Scott --- tools/patron-load/ldap_osrf_sync | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/patron-load/ldap_osrf_sync b/tools/patron-load/ldap_osrf_sync index 420936a35a..3601958277 100644 --- a/tools/patron-load/ldap_osrf_sync +++ b/tools/patron-load/ldap_osrf_sync @@ -156,6 +156,9 @@ class User: return 11 elif affiliation == 'staff': return 15 + elif affiliation == 'proxy': + return None + return None def get_home_ou(self): """ @@ -433,6 +436,10 @@ def create_evergreen_user(auth, result_data): if not user: return + if user.profile is None: + print >> sys.stderr, "No profile set for %s" % user.usrname + return + found = find_evergreen_user(auth, user) if found: print("Found: %s" % user.usrname) -- 2.11.0