When an LDIF file describes a set of changes, and thus
contains the "changetype" attribute, the corresponding
dn for each record being changed is not available to
the handle() callback. Instead the passed in "dn" is
really the change type, such as "add". Without
knowledge of the dn, the record is not very useful.
There should be a way to get both the change type as
well as the dn.
Perhaps this can be fixed without requiring a change in
the handle() method, by passing in keyword arguments.
I would suggest that the first two unnamed arguments
continue to be the same, but pass in an extra
'changetype' argument for change records,
handle( dn, entry, changetype='add' )
For a changetype record, the first argument, dn, should
always be the actual DN.
The doc strings for the LDIFParser class should also
probably mention the types and meanings of the
arguments passed to the handle() method, as right now
you have to read throught the ldif.py source to
determine that.
Logged In: YES
user_id=64920
Originator: NO
Small fix committed according to SF#1683746.
But I still have code pending for review contributed by Roland Hedberg.
This needs some tweaking though.
Support for change records was released with 2.4.20