From 2a91cd463ae63ab1e716159d3dac2b8ee923c4c7 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 9 May 2000 10:56:00 +0000 Subject: [PATCH] Caolan McNamara: properly undo the byte-stuffing of lines starting with a dot. [GvR change: only unstuff when line starts with two dots.] --- Lib/poplib.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/poplib.py b/Lib/poplib.py index 118811caaf..97a9b0dd62 100644 --- a/Lib/poplib.py +++ b/Lib/poplib.py @@ -133,6 +133,9 @@ class POP3: list = []; octets = 0 line, o = self._getline() while line != '.': + if line[:2] == '..': + o = o-1 + line = line[1:] octets = octets + o list.append(line) line, o = self._getline() -- 2.40.0