subtree move

Michael Ströder michael at
Tue Jun 26 09:37:36 CEST 2007

Roland Hedberg wrote:
>> I have something slightly more efficient based on evaluating
>> hasSubordinates or similar attributes for sub-tree deletion in web2ldap.
> If you are willing to share I'd love to have it :-)

Hmm, look into web2ldap's source (GPL): function DelTree() in

But it's not in a shape to directly use it. It's more munged into the
application. And the hasSubordinates handling is slightly different from
what you need. It rather trys to delete a whole entry and retries
differently after receiving ldap.NOT_ALLOWED_ON_NONLEAF.

Hmm, glancing over the code I'd suggest to implement it separately. I'd
try to rename the whole sub-tree first and then handle

Ciao, Michael.

More information about the python-ldap mailing list