Kaydet (Commit) 3ddf8e33 authored tarafından Michael W. Hudson's avatar Michael W. Hudson

backport loewis' checkin of

    revision 1.66 of ftplib.py

Access the exception argument to see whether it starts with '500'.
Fixes #527855.
üst fd268a19
......@@ -492,8 +492,8 @@ class FTP:
try:
return self.voidcmd('CDUP')
except error_perm, msg:
if msg[:3] != '500':
raise error_perm, msg
if msg.args[0][:3] != '500':
raise
elif dirname == '':
dirname = '.' # does nothing, but could return error
cmd = 'CWD ' + dirname
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment