response codes are of the type string
Opened this issue · 6 comments
Which fails a code verification that is common in requests of the type
if r.status_code == 226: myprocess
Sounds like a problem. =) If you open a pull request with the fix, I'll happily merge it. =)
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..
@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.
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. =)
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.
Sure men, count on me.