Skip to content
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

response codes are of the type string #10

Open
chiffa opened this issue Mar 13, 2015 · 6 comments
Open

response codes are of the type string #10

chiffa opened this issue Mar 13, 2015 · 6 comments

Comments

@chiffa
Copy link

chiffa commented Mar 13, 2015

Which fails a code verification that is common in requests of the type

if r.status_code == 226: myprocess

@Lukasa
Copy link
Owner

Lukasa commented Mar 13, 2015

Sounds like a problem. =) If you open a pull request with the fix, I'll happily merge it. =)

@adrienbrunet
Copy link
Contributor

Yop, got the same issue here. Response is returning '226-File' as a status code.

"/blabla/python3.4/site-packages/requests_ftp/ftp.py", line 116, in build_response
    response.status_code = int(code.split()[0])
ValueError: invalid literal for int() with base 10: '226-File'

Will it be valid to add a
response.status_code = int(code.split()[0].split('-')[0])

Is the "-File' info important here? This library is a bit far from perfection at the moment but really helpful, thanks for that mates. Hopes this helps..

@Lukasa
Copy link
Owner

Lukasa commented Dec 17, 2015

@adrienbrunet This library is definitely far from perfection: it was mostly intended as a joke when I originally wrote it! I'm definitely open to finding someone else to take over maintenance of it and to turn it into something more useful, so if you feel like proposing some pull requests and getting this library up and running into something better, I'll happily consider taking on a maintainer.

@adrienbrunet
Copy link
Contributor

yep, I got that reading the Readme file. I just want to make clear it wasnt a critic, just a fact. I'm eager to help. I havn't found ftp support with python-requests elsewhere... Have I missed something? Or this library is the only one doing that? I already have trouble maintaining django-angular with Jacob Rief, and I know almost nothnig about ftp haha. If I can help, that would be a pleasure but I'm not convinced I'd be a good choice as a maintainer. =)

@Lukasa
Copy link
Owner

Lukasa commented Dec 17, 2015

yep, I got that reading the Readme file. I just want to make clear it wasnt a critic, just a fact.

Oh, I know. =) No need to apologise!

Have I missed something?

Not as far as I know.

Regardless, if you'd like to propose a pull request with your fix and a test that validates that this case is fixed, I'll happily merge it.

@adrienbrunet
Copy link
Contributor

Sure men, count on me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants