[sysadmin-bin] create-auth: fix list vs set and ignore groups which do not have members
- From: Olav Vitters <ovitters src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] create-auth: fix list vs set and ignore groups which do not have members
- Date: Mon, 7 Mar 2011 21:10:30 +0000 (UTC)
commit 63ed531fb9974331a83156d5a35ca8463c526d9a
Author: Olav Vitters <olav vitters nl>
Date: Mon Mar 7 22:10:25 2011 +0100
create-auth: fix list vs set and ignore groups which do not have members
create-auth | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/create-auth b/create-auth
index 65a1020..ff94aa3 100755
--- a/create-auth
+++ b/create-auth
@@ -50,7 +50,7 @@ def get_uids_from_group(group):
break
else:
group_info = group_data[0][1]
- return group_info['memberUid']
+ return group_info.get('memberUid', [])
except ldap.LDAPError, e:
print e
sys.exit(1)
@@ -128,7 +128,7 @@ def build_user_hash(group_list):
if GNOMEGIT or MANGO:
gnomevcs_users = set(get_uids_from_group ('gnomecvs') + get_uids_from_group ('gnomevcs')) - users
if RRSYNC: # XXX - HACK TO TEST MASTER-VM SETUP
- gnomevcs_users = get_uids_from_group ('testuser') - users
+ gnomevcs_users = set(get_uids_from_group ('testuser')) - users
if TRANSLATION_USER:
gnomevcs_users.update(['translations'])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]