This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author marienz
Recipients marienz
Date 2009-09-19.05:36:05
SpamBayes Score 7.027712e-14
Marked as misclassified No
Message-id <1253338570.09.0.666408311611.issue6944@psf.upfronthosting.co.za>
In-reply-to
Content
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 format but argument is not a tuple

An explicit check for TypeError seems like the best way to fix this.
Patch (against Python 3.1.1, but it looked like this applies easily to
other branches too) attached, which also removes a bit of dead code.
History
Date User Action Args
2009-09-19 05:36:10marienzsetrecipients: + marienz
2009-09-19 05:36:10marienzsetmessageid: <1253338570.09.0.666408311611.issue6944@psf.upfronthosting.co.za>
2009-09-19 05:36:07marienzlinkissue6944 messages
2009-09-19 05:36:06marienzcreate