[issue10169] socket.sendto raises incorrect exception when passed incorrect types

Ezio Melotti report at bugs.python.org
Tue May 3 10:13:24 CEST 2011


Ezio Melotti <ezio.melotti at gmail.com> added the comment:

The original code was trying to call PyArg_ParseTuple assuming 2 args and in case of failure (*any* failure) was starting over assuming 3 args.
The attached patch makes PyArg_ParseTuple accept 2 or 3 args and re-arranges the last two if 'flags' is passed.
The tests pass, but a few more tests should be added.

----------
assignee:  -> ezio.melotti
keywords: +patch
nosy: +ezio.melotti
stage:  -> patch review
Added file: http://bugs.python.org/file21867/issue10169.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10169>
_______________________________________


More information about the Python-bugs-list mailing list