changeset 60682:654e1cc9b4ff 3.1

Fix Issue #3817: 225 is now considered a valid response code for ABOR
author Giampaolo Rodolà <g.rodola@gmail.com>
date Sun, 18 Apr 2010 13:23:21 +0000
parents d3eab4597395
children 13d86fc69940
files Lib/ftplib.py Misc/NEWS
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Lib/ftplib.py	Sun Apr 18 08:25:10 2010 +0000
+++ b/Lib/ftplib.py	Sun Apr 18 13:23:21 2010 +0000
@@ -236,7 +236,7 @@
         if self.debugging > 1: print('*put urgent*', self.sanitize(line))
         self.sock.sendall(line, MSG_OOB)
         resp = self.getmultiline()
-        if resp[:3] not in ('426', '226'):
+        if resp[:3] not in ('426', '225', '226'):
             raise error_proto(resp)
 
     def sendcmd(self, cmd):
--- a/Misc/NEWS	Sun Apr 18 08:25:10 2010 +0000
+++ b/Misc/NEWS	Sun Apr 18 13:23:21 2010 +0000
@@ -31,6 +31,9 @@
 Library
 -------
 
+- Issue #3817: ftplib.FTP.abort() method now considers 225 a valid response
+  code as stated in RFC-959 at chapter 5.4.
+
 - Issue #8394: _ctypes.dlopen() accepts bytes, bytearray and str with
   surrogates.