[Python-checkins] CVS: python/dist/src/Lib ftplib.py,1.65,1.66

Martin v. L?wis loewis@users.sourceforge.net
Sun, 10 Mar 2002 08:00:01 -0800


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv27998

Modified Files:
	ftplib.py 
Log Message:
Access the exception argument to see whether it starts with '500'.
Fixes #527855.


Index: ftplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ftplib.py,v
retrieving revision 1.65
retrieving revision 1.66
diff -C2 -d -r1.65 -r1.66
*** ftplib.py	16 Feb 2002 23:06:15 -0000	1.65
--- ftplib.py	10 Mar 2002 15:59:58 -0000	1.66
***************
*** 488,493 ****
                  return self.voidcmd('CDUP')
              except error_perm, msg:
!                 if msg[:3] != '500':
!                     raise error_perm, msg
          elif dirname == '':
              dirname = '.'  # does nothing, but could return error
--- 488,493 ----
                  return self.voidcmd('CDUP')
              except error_perm, msg:
!                 if msg.args[0][:3] != '500':
!                     raise
          elif dirname == '':
              dirname = '.'  # does nothing, but could return error