diff --git a/Lib/ldif.py b/Lib/ldif.py index 2d9f4c3..20fd61a 100644 --- a/Lib/ldif.py +++ b/Lib/ldif.py @@ -3,7 +3,7 @@ See http://www.python-ldap.org/ for details. -$Id: ldif.py,v 1.91 2016/01/26 10:43:24 stroeder Exp $ +$Id: ldif.py,v 1.92 2016/02/29 22:51:36 stroeder Exp $ Python compability note: Tested with Python 2.0+, but should work with Python 1.5.2+. @@ -97,7 +97,7 @@ def __init__(self,output_file,base64_attrs=None,cols=76,line_sep='\n'): self._output_file = output_file self._base64_attrs = list_dict([a.lower() for a in (base64_attrs or [])]) self._cols = cols - self._line_sep = line_sep + self._last_line_sep = line_sep self.records_written = 0 def _unfold_lines(self,line): @@ -108,16 +108,16 @@ def _unfold_lines(self,line): line_len = len(line) if line_len<=self._cols: self._output_file.write(line) - self._output_file.write(self._line_sep) + self._output_file.write(self._last_line_sep) else: # Fold line pos = self._cols self._output_file.write(line[0:min(line_len,self._cols)]) - self._output_file.write(self._line_sep) + self._output_file.write(self._last_line_sep) while pos