-
Notifications
You must be signed in to change notification settings - Fork 993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes ftp download when authentication is required #4092
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right:
class ftplib.FTP([host[, user[, passwd[, acct[, timeout]]]]])
Return a new instance of the FTP class. When host is given, the method call connect(host) is made.
When user is given, additionally the method call login(user, passwd, acct) is made ....
Hi, Thanks for pointing out. I've update tests and code to support anonymous ftp too. |
At least there is an use-case that is wrong (see my PR to efremovd branch)
add some test cases (work on tmp_folder)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Now I think that all the use cases are covered 👍
* Fixes ftp download when authentication is required * Fixes back anonymous ftp download * add some test cases (work on tmp_folder) * Fixes ftp download of file that does not exist
Changelog: Bugfix: In ftp_download function there is extra call to ftp.login() with empty args. This causes ftp lib to login again with empty credentials and throwing exception because authentication is required by server.
Docs: omit
It's a small fix so I did not create any issue about it.