Message92858
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. |
|
Date |
User |
Action |
Args |
2009-09-19 05:36:10 | marienz | set | recipients:
+ marienz |
2009-09-19 05:36:10 | marienz | set | messageid: <1253338570.09.0.666408311611.issue6944@psf.upfronthosting.co.za> |
2009-09-19 05:36:07 | marienz | link | issue6944 messages |
2009-09-19 05:36:06 | marienz | create | |
|