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

Skip to content

Commit 6bbd1d0

Browse files
committed
According to Robin Dunn, at least one FTP server returns 200 instead
of 250 on a successful delete.
1 parent 1717ba4 commit 6bbd1d0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/ftplib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ def rename(self, fromname, toname):
422422
def delete(self, filename):
423423
'''Delete a file.'''
424424
resp = self.sendcmd('DELE ' + filename)
425-
if resp[:3] == '250':
425+
if resp[:3] in ('250', '200'):
426426
return resp
427427
elif resp[:1] == '5':
428428
raise error_perm, resp

0 commit comments

Comments
 (0)