Skip to content

Commit

Permalink
fixed regression introduced with 2.4.26: ldif.LDIFParser did not full…
Browse files Browse the repository at this point in the history
…y parse LDIF records without trailing empty separator line
  • Loading branch information
stroeder committed Jul 30, 2016
1 parent 57be6e8 commit c1c3f80
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Changes since 2.4.26:
Lib/
* added 'strf_secs' and 'strp_secs' to ldap.functions.__all__
* fixed regression introduced with 2.4.26:
ldif.LDIFParser did not accept LDIF entry records
without trailing empty separator line
ldif.LDIFParser did not fully parse LDIF records without trailing empty
separator line

----------------------------------------------------------------
Released 2.4.26 2016-07-24
Expand Down Expand Up @@ -1282,4 +1282,4 @@ Released 2.0.0pre02 2002-02-01
----------------------------------------------------------------
Released 1.10alpha3 2000-09-19

$Id: CHANGES,v 1.391 2016/07/30 19:01:59 stroeder Exp $
$Id: CHANGES,v 1.392 2016/07/30 19:38:05 stroeder Exp $
7 changes: 5 additions & 2 deletions Lib/ldif.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
See http://www.python-ldap.org/ for details.
$Id: ldif.py,v 1.99 2016/07/30 19:01:59 stroeder Exp $
$Id: ldif.py,v 1.100 2016/07/30 19:38:05 stroeder Exp $
Python compability note:
Tested with Python 2.0+, but should work with Python 1.5.2+.
Expand Down Expand Up @@ -500,7 +500,10 @@ def parse_change_records(self):
# we now have the attribute name to be modified
modattr = v
modvalues = []
k,v = next_key_and_value()
try:
k,v = next_key_and_value()
except EOFError:
k,v = None,None
while k==modattr:
modvalues.append(v)
try:
Expand Down

0 comments on commit c1c3f80

Please sign in to comment.