Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2a91cd4

Browse files
committed
Caolan McNamara: properly undo the byte-stuffing of lines starting
with a dot. [GvR change: only unstuff when line starts with two dots.]
1 parent 9cef99f commit 2a91cd4

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Lib/poplib.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ def _getlongresp(self):
133133
list = []; octets = 0
134134
line, o = self._getline()
135135
while line != '.':
136+
if line[:2] == '..':
137+
o = o-1
138+
line = line[1:]
136139
octets = octets + o
137140
list.append(line)
138141
line, o = self._getline()

0 commit comments

Comments
 (0)