Skip to content

Commit 22357e1

Browse files
committed
Fix Issue #3817: 225 is now considered a valid response code for ABOR
1 parent a88d7df commit 22357e1

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

Lib/ftplib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def abort(self):
236236
if self.debugging > 1: print('*put urgent*', self.sanitize(line))
237237
self.sock.sendall(line, MSG_OOB)
238238
resp = self.getmultiline()
239-
if resp[:3] not in ('426', '226'):
239+
if resp[:3] not in ('426', '225', '226'):
240240
raise error_proto(resp)
241241

242242
def sendcmd(self, cmd):

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ Core and Builtins
3131
Library
3232
-------
3333

34+
- Issue #3817: ftplib.FTP.abort() method now considers 225 a valid response
35+
code as stated in RFC-959 at chapter 5.4.
36+
3437
- Issue #8394: _ctypes.dlopen() accepts bytes, bytearray and str with
3538
surrogates.
3639

0 commit comments

Comments
 (0)