[issue6944] socket.getnameinfo raises SystemError on bogus input

2009-09-19 Thread Georg Brandl
Georg Brandl added the comment: Adapted the test that expected the SystemError (?!) and committed in r74943. Will backport to 2.6. -- nosy: +georg.brandl resolution: -> fixed status: open -> closed ___ Python tracker

[issue6944] socket.getnameinfo raises SystemError on bogus input

2009-09-18 Thread Marien Zwart
Marien Zwart added the comment: Attaching a less broken patch, after Taggnostr pointed out on irc that the code I removed is not actually dead. I really don't know why I thought it was. I did take the opportunity to make it more obvious what that code is actually checking for. -- Added

[issue6944] socket.getnameinfo raises SystemError on bogus input

2009-09-18 Thread Marien Zwart
New submission from Marien Zwart : socket.getnameinfo passes a PyObject* to PyArg_ParseTuple without checking if it's a tuple first. That means it raises SystemError on invalid input where TypeError would make more sense: >>> socket.getnameinfo('localhost', 0) SystemError: new style getargs form