diff options
| author | Georg Brandl <georg@python.org> | 2009-04-05 10:51:10 (GMT) |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2009-04-05 10:51:10 (GMT) |
| commit | f7a1efcd98dbb7d02f75668d8c7e4df2eb37b942 (patch) | |
| tree | 8a80dd74e62f62abcca720100f49830aac6aa429 /Lib/ftplib.py | |
| parent | e42e2535c4a5d7f11693e598f4cd0844acc278b9 (diff) | |
| download | cpython-f7a1efcd98dbb7d02f75668d8c7e4df2eb37b942.zip cpython-f7a1efcd98dbb7d02f75668d8c7e4df2eb37b942.tar.gz cpython-f7a1efcd98dbb7d02f75668d8c7e4df2eb37b942.tar.bz2 | |
Merged revisions 71217 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r71217 | georg.brandl | 2009-04-05 12:48:47 +0200 (So, 05 Apr 2009) | 1 line
#1726172: dont raise an unexpected IndexError if a voidresp() call has an empty response.
........
Diffstat (limited to 'Lib/ftplib.py')
| -rw-r--r-- | Lib/ftplib.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/ftplib.py b/Lib/ftplib.py index 807bc38..222e77d 100644 --- a/Lib/ftplib.py +++ b/Lib/ftplib.py @@ -221,7 +221,7 @@ class FTP: def voidresp(self): """Expect a response beginning with '2'.""" resp = self.getresp() - if resp[0] != '2': + if resp[:1] != '2': raise error_reply, resp return resp @@ -520,8 +520,6 @@ class FTP: resp = self.sendcmd('DELE ' + filename) if resp[:3] in ('250', '200'): return resp - elif resp[:1] == '5': - raise error_perm, resp else: raise error_reply, resp |
