Mercurial > cpython-lru_cache-weakref
diff Modules/socketmodule.c @ 58697:37f6264d1aa3
Merged revisions 77970 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r77970 | antoine.pitrou | 2010-02-04 21:20:18 +0100 (jeu., 04 févr. 2010) | 6 lines
Issue #4772: Raise a ValueError when an unknown Bluetooth protocol is
specified, rather than fall through to AF_PACKET (in the `socket` module).
Also, raise ValueError rather than TypeError when an unknown TIPC address
type is specified. Patch by Brian Curtin.
........
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Thu, 04 Feb 2010 20:23:24 +0000 |
| parents | d399f6dc9ee4 |
| children | 4b55cea55067 |
line wrap: on
line diff
--- a/Modules/socketmodule.c Thu Feb 04 17:02:07 2010 +0000 +++ b/Modules/socketmodule.c Thu Feb 04 20:23:24 2010 +0000 @@ -1053,6 +1053,10 @@ } #endif + default: + PyErr_SetString(PyExc_ValueError, + "Unknown Bluetooth protocol"); + return NULL; } #endif @@ -1104,7 +1108,7 @@ 0, a->scope); } else { - PyErr_SetString(PyExc_TypeError, + PyErr_SetString(PyExc_ValueError, "Invalid address type"); return NULL; }
