diff --git a/Lib/ftplib.py b/Lib/ftplib.py index e18f6841858..ac33a127a89 100644 --- a/Lib/ftplib.py +++ b/Lib/ftplib.py @@ -351,7 +351,7 @@ class FTP: break if line[-2:] == CRLF: line = line[:-2] - elif line[:-1] == '\n': + elif line[-1:] == '\n': line = line[:-1] callback(line) fp.close()