Kaydet (Commit) b5255114 authored tarafından Martin v. Löwis's avatar Martin v. Löwis

Access the exception argument to see whether it starts with '500'.

Fixes #527855.
üst dfce3bf9
......@@ -487,8 +487,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