Sorting on DN attributes broken ?

Matthieu Patou mat+Informatique.Samba at matws.net
Thu Aug 20 14:32:03 MDT 2009


Hi all,

I tried to used python binding for sort DN attibutes and the result 
seems a bit strange.

I have a list of dn: listMissing
And when I try this
listMissing.sort()
for e in listMissing:
         print >>sys.stderr,e

I get first 
:/usr/local/src/samba4/source4/scripting/bin/upgradeschema.py:363: 
RuntimeWarning: tp_compare didn't return -1, 0 or 1

And after the result are like this :

CN=ANR,CN=Schema,CN=Configuration,DC=smb4,DC=tst
CN=DSA,CN=Schema,CN=Configuration,DC=smb4,DC=tst
CN=PKT,CN=Schema,CN=Configuration,DC=smb4,DC=tst
CN=Cost,CN=Schema,CN=Configuration,DC=smb4,DC=tst
CN=host,CN=Schema,CN=Configuration,DC=smb4,DC=tst
CN=room,CN=Schema,CN=Configuration,DC=smb4,DC=tst
CN=drink,CN=Schema,CN=Configuration,DC=smb4,DC=tst
CN=Gecos,CN=Schema,CN=Configuration,DC=smb4,DC=tst
CN=Owner,CN=Schema,CN=Configuration,DC=smb4,DC=tst
CN=Device,CN=Schema,CN=Configuration,DC=smb4,DC=tst
CN=FT-Dfs,CN=Schema,CN=Configuration,DC=smb4,DC=tst
CN=IpHost,CN=Schema,CN=Configuration,DC=smb4,DC=tst
CN=NisMap,CN=Schema,CN=Configuration,DC=smb4,DC=tst
CN=OncRpc,CN=Schema,CN=Configuration,DC=smb4,DC=tst

Clearly not sorted ...

Does anyone have an explanation ?

Matthieu.


More information about the samba-technical mailing list