summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/automember.py
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2013-01-16 14:14:58 +0100
committerMartin Kosek <mkosek@redhat.com>2013-03-01 16:59:42 +0100
commitef1cd6e24732e7fa64f6c4b0ce32a909fbf1df5d (patch)
tree84ad0688b942996dd7b8fa58af3e2702b92f85d2 /ipalib/plugins/automember.py
parente2120c31c3ba62d1bc57825b90a30d26ca58aa79 (diff)
downloadfreeipa-ef1cd6e24732e7fa64f6c4b0ce32a909fbf1df5d.tar.gz
freeipa-ef1cd6e24732e7fa64f6c4b0ce32a909fbf1df5d.tar.xz
freeipa-ef1cd6e24732e7fa64f6c4b0ce32a909fbf1df5d.zip
Add custom mapping object for LDAP entry data.
Diffstat (limited to 'ipalib/plugins/automember.py')
-rw-r--r--ipalib/plugins/automember.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ipalib/plugins/automember.py b/ipalib/plugins/automember.py
index 0a7f37319..af39f6aac 100644
--- a/ipalib/plugins/automember.py
+++ b/ipalib/plugins/automember.py
@@ -305,7 +305,7 @@ class automember_add_condition(LDAPUpdate):
try:
(dn, old_entry) = ldap.get_entry(
dn, [attr], normalize=self.obj.normalize_dn)
- for regex in old_entry:
+ for regex in old_entry.keys():
if not isinstance(entry_attrs[regex], (list, tuple)):
entry_attrs[regex] = [entry_attrs[regex]]
duplicate = set(old_entry[regex]) & set(entry_attrs[regex])
@@ -319,7 +319,7 @@ class automember_add_condition(LDAPUpdate):
# Set failed and completed to they can be harvested in the execute super
setattr(context, 'failed', failed)
setattr(context, 'completed', completed)
- setattr(context, 'entry_attrs', entry_attrs)
+ setattr(context, 'entry_attrs', dict(entry_attrs))
# Make sure to returned the failed results if there is nothing to remove
if completed == 0:
@@ -409,7 +409,7 @@ class automember_remove_condition(LDAPUpdate):
# Set failed and completed to they can be harvested in the execute super
setattr(context, 'failed', failed)
setattr(context, 'completed', completed)
- setattr(context, 'entry_attrs', entry_attrs)
+ setattr(context, 'entry_attrs', dict(entry_attrs))
# Make sure to returned the failed results if there is nothing to remove
if completed == 0: