Kaydet (Commit) 39c78510 authored tarafından Guido van Rossum's avatar Guido van Rossum

Martijn Pieters convinced me that when readline() strips the trailing

newline from a multifile part, it should also strip a trailing \r\n.
üst 9475a231
......@@ -76,7 +76,10 @@ class MultiFile:
line = self.readahead
if line:
self.readahead = self._readline()
if not self.readahead and line[-1:] == "\n":
if not self.readahead:
if line[-2:] == "\r\n":
line = line[:-2]
elif line[-1:] == "\n":
line = line[:-1]
return line
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment