s4:samdb python bindings - we don't need the attributes here

Andrew Bartlett abartlet at samba.org
Sun Aug 16 17:17:59 MDT 2009


On Fri, 2009-08-14 at 05:18 -0500, Matthias Dieter Wallnöfer wrote:
> The branch, master has been updated
>        via  53ef426e6f68728763436bd0cd3dd91180c00579 (commit)
>        via  fa61fdf8b7784081e515e9a26f84a83c1188d97a (commit)
>       from  639c9ccb93e2766d865c769fa8c53a7c3d5f307c (commit)
> 
> http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
> 
> 
> - Log -----------------------------------------------------------------
> commit 53ef426e6f68728763436bd0cd3dd91180c00579
> Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
> Date:   Fri Aug 14 01:42:12 2009 +0200
> 
>     s4:samdb python bindings - we don't need the attributes here

 
> diff --git a/source4/scripting/python/samba/samdb.py b/source4/scripting/python/samba/samdb.py
> index 631f31c..508449a 100644
> --- a/source4/scripting/python/samba/samdb.py
> +++ b/source4/scripting/python/samba/samdb.py
> @@ -186,8 +186,7 @@ pwdLastSet: 0
>              assert(domain_dn is not None)
>  
>              res = self.search(domain_dn, scope=ldb.SCOPE_SUBTREE, 
> -                              expression=filter,
> -                              attrs=[])
> +                              expression=filter)
>              assert(len(res) == 1)
>              user_dn = res[0].dn

Doesn't this just mean we extract all the attributes instead?  Setting
attrs=[] is exactly the right way to say 'I want no attributes'.

Andrew Bartlett

-- 
Andrew Bartlett
http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Cisco Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20090817/0915fa39/attachment.pgp>


More information about the samba-technical mailing list