mollie / mollie-api-python

Mollie API client for Python
http://www.mollie.com
BSD 2-Clause "Simplified" License
113 stars 55 forks source link

os.uname not supported on windows #4

Closed Lexstok closed 8 years ago

Lexstok commented 9 years ago

Hi there, I'm writing a donation page to contact mollie with. When I ask mollie the list of payment methods (testing on windows), I get the following error :

module' object has no attribute 'uname'

Traceback seems to indicate that this comes from the API file Client.py, on line 60 from the def performHttpCall

From what I can gather from the internets, os.uname is not supported on windows, see this link: http://stackoverflow.com/questions/4553129/when-to-use-os-name-sys-platform-or-platform-system http://bugs.python.org/issue8080

Using platform.uname() should work on all systems.

Zowie commented 9 years ago

Hi @Lexstok

I forked the Mollie Python api some time ago and did some small improvements. I read your Issue right before i finished a small round of work so and i changed it for you, as it's definitely a general improvement :)

I've included 2 tests, and will create more in the future when i have time. I don't think i introduced any breaking changes, so feel free to use it and please tell me when something goes wrong.

I'm going to submit a PR when i have the feeling i've included enough tests to make it a little bit more 'Production grade'. If you're using Pip you can install it with:

pip install git+https://github.com/Akoten/mollie-api-python.git

for now.

Good luck!

Lexstok commented 9 years ago

Hi @Zowie

Thanks for including it in your fork. Yesterday evening I changed that code myself, in the process creating my own fork. I must admit I'm a github newbie, so I'm still getting used to forking and pulling. :-)

I'll certainly check out your version, curious what you changed.

Currently I'm on a bit of a countdown to get everything sorted out the next few days.

mollierobbert commented 8 years ago

This was merged in https://github.com/mollie/mollie-api-python/commit/11c795bccfe904259619e14ca3c77e33e045100c. Closing the issue.