diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2011-10-12 20:12:26 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2011-10-12 22:44:40 +0200 |
commit | c6481f4f2491ba76f2da7fdb67bc2264b5b83f12 (patch) | |
tree | 8b28052455f751ea3da96655a659a1ae8a6dd5f4 /source4/scripting | |
parent | bd260f03ab492d03c2890db47dc6fb4f1b824a1a (diff) | |
download | samba-c6481f4f2491ba76f2da7fdb67bc2264b5b83f12.tar.gz samba-c6481f4f2491ba76f2da7fdb67bc2264b5b83f12.tar.bz2 samba-c6481f4f2491ba76f2da7fdb67bc2264b5b83f12.zip |
samba.upgrade: Use list comprehension.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Wed Oct 12 22:44:40 CEST 2011 on sn-devel-104
Diffstat (limited to 'source4/scripting')
-rw-r--r-- | source4/scripting/python/samba/upgrade.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/scripting/python/samba/upgrade.py b/source4/scripting/python/samba/upgrade.py index 53ae93afcf..b41ab77eb2 100644 --- a/source4/scripting/python/samba/upgrade.py +++ b/source4/scripting/python/samba/upgrade.py @@ -602,8 +602,8 @@ Please fix this account before attempting to upgrade again logger.info("Next rid = %d", next_rid) # Check for same username/groupname - group_names = set(map(lambda g: g.nt_name, grouplist)) - user_names = set(map(lambda u: u['account_name'], userlist)) + group_names = set([g.nt_name for g in grouplist]) + user_names = set([u['account_name'] for u in userlist]) common_names = group_names.intersection(user_names) if common_names: logger.error("Following names are both user names and group names:") @@ -612,8 +612,8 @@ Please fix this account before attempting to upgrade again raise ProvisioningError("Please remove common user/group names before upgrade.") # Check for same user sid/group sid - group_sids = set(map(lambda g: str(g.sid), grouplist)) - user_sids = set(map(lambda u: "%s-%u" % (domainsid, u['rid']), userlist)) + group_sids = set([str(g.sid) for g in grouplist]) + user_sids = set(["%s-%u" % (domainsid, u['rid']) for u in userlist]) common_sids = group_sids.intersection(user_sids) if common_sids: logger.error("Following sids are both user and group sids:") |