[Freeipa-devel] [PATCH] 0030 Fix --{user, group}-ignore-attribute in migration plugin.

Martin Basti mbasti at redhat.com
Thu Nov 20 13:51:36 UTC 2014


On 20/11/14 11:53, David Kupka wrote:
> On 11/20/2014 10:03 AM, Jan Cholasta wrote:
>> Dne 20.11.2014 v 09:51 David Kupka napsal(a):
>>> https://fedorahosted.org/freeipa/ticket/4620
>>
>> IMO changing the loop to:
>>
>>     for attr in attr_blacklist:
>>         entry_attrs.pop(attr, None)
>>
>> would be better, because LDAPEntry already handles case insensitivity in
>> attribute names.
>>
> This seems better, thanks.
>
>
IMO the same problem is with objectclasses.


     # do not migrate all object classes
     if 'objectclass' in entry_attrs:
         for object_class in kwargs.get('oc_blacklist', []):
             try:
                 entry_attrs['objectclass'].remove(object_class)   # 
this is case sensitive
             except ValueError:  # object class not present
                 pass

Am I right?
Martin^2

-- 
Martin Basti




More information about the Freeipa-devel mailing list