diff options
Diffstat (limited to 'Lib/ftplib.py')
-rw-r--r-- | Lib/ftplib.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/ftplib.py b/Lib/ftplib.py index cad7a5b..aaf12fe 100644 --- a/Lib/ftplib.py +++ b/Lib/ftplib.py @@ -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 |