[Freeipa-devel] make-lint failures

Alexander Bokovoy abokovoy at redhat.com
Tue Nov 29 22:12:24 UTC 2011


On Tue, 29 Nov 2011, Rob Crittenden wrote:
> Seeing some new make-lint failures after the reworking of ipaldap
> function signatures;
> 
> $ ./make-lint
> ipaserver/install/adtrustinstance.py:101: [E1120,
> ADTRUSTInstance.__create_samba_user] No value passed for parameter
> 'modlist' in function call
> ipaserver/install/adtrustinstance.py:190: [E1120,
> ADTRUSTInstance.__create_samba_domain_object] No value passed for
> parameter 'modlist' in function call
> ipaserver/install/adtrustinstance.py:198: [E1120,
> ADTRUSTInstance.__create_samba_domain_object] No value passed for
> parameter 'modlist' in function call
> 
> I wonder if the signature needs to be:
> 
>     def add_s(self, dn, modlist=None):
> 
> For the case were dn isn't an Entry we probably need to raise an
> exception if modlist is None (or test to see what python-ldap add_s
> does).
The original LDAPObject.add_s() has modlist as non-optional argument:
    def add_s(self,dn,modlist):

I don't think it is wise to break that API assumption.

In all the cases above it should get .add_s(entry) replaced by 
.addEntry(entry).

The reason these failures are shown is because Martin reverted the 
earlier version of Sumit's patch that you mistakenly committed. Sumit 
has produced new patch already but there is one minor issue in it 
(another .add_s() -> .addEntry() replacement needs to be done).

-- 
/ Alexander Bokovoy




More information about the Freeipa-devel mailing list