Menu

#5 LDIF parser hides DN with change record type

None
closed
None
5
2016-02-05
2003-08-18
No

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.

Discussion

  • Michael Ströder

    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.

     
  • Michael Ströder

    • status: open --> closed
    • assigned_to: Michael Ströder
    • Group: -->
     
  • Michael Ströder

    Support for change records was released with 2.4.20

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.