This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: ftplib error (exception) handling bug
Type: Stage:
Components: Extension Modules Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: loewis, solomoriah
Priority: normal Keywords:

Created on 2002-03-09 18:34 by solomoriah, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Messages (2)
msg9604 - (view) Author: Chris Gonnerman (solomoriah) Date: 2002-03-09 18:34
On line 445 of ftplib.py we find:

    if msg[:3] != '500':

msg isn't a string, it's an error_perm instance.  
Change the line to this:

    if str(msg)[:3] != '500':

(with correct indentation obviously) and the problem 
is solved.

I don't know if this is in 2.2 or not as I haven't 
installed it yet.
msg9605 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-03-10 16:00
Logged In: YES 
user_id=21627

Thanks for the report; fixed in ftplib.py 1.66.
History
Date User Action Args
2022-04-10 16:05:04adminsetgithub: 36232
2002-03-09 18:34:12solomoriahcreate