mirror of
https://github.com/python/cpython.git
synced 2025-11-26 13:22:51 +00:00
According to Robin Dunn, at least one FTP server returns 200 instead
of 250 on a successful delete.
This commit is contained in:
parent
1717ba498f
commit
6bbd1d0f0e
1 changed files with 1 additions and 1 deletions
|
|
@ -422,7 +422,7 @@ class FTP:
|
|||
def delete(self, filename):
|
||||
'''Delete a file.'''
|
||||
resp = self.sendcmd('DELE ' + filename)
|
||||
if resp[:3] == '250':
|
||||
if resp[:3] in ('250', '200'):
|
||||
return resp
|
||||
elif resp[:1] == '5':
|
||||
raise error_perm, resp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue