[Python-checkins] r77970 - in python/trunk: Misc/NEWS Modules/socketmodule.c
antoine.pitrou
python-checkins at python.org
Thu Feb 4 21:20:18 CET 2010
Author: antoine.pitrou
Date: Thu Feb 4 21:20:18 2010
New Revision: 77970
Log:
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.
Modified:
python/trunk/Misc/NEWS
python/trunk/Modules/socketmodule.c
Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS (original)
+++ python/trunk/Misc/NEWS Thu Feb 4 21:20:18 2010
@@ -55,6 +55,11 @@
Library
-------
+- 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.
+
- logging: Implemented PEP 391.
- Issue #6939: Fix file I/O objects in the `io` module to keep the original
Modified: python/trunk/Modules/socketmodule.c
==============================================================================
--- python/trunk/Modules/socketmodule.c (original)
+++ python/trunk/Modules/socketmodule.c Thu Feb 4 21:20:18 2010
@@ -1089,6 +1089,10 @@
}
#endif
+ default:
+ PyErr_SetString(PyExc_ValueError,
+ "Unknown Bluetooth protocol");
+ return NULL;
}
#endif
@@ -1140,7 +1144,7 @@
0,
a->scope);
} else {
- PyErr_SetString(PyExc_TypeError,
+ PyErr_SetString(PyExc_ValueError,
"Invalid address type");
return NULL;
}
More information about the Python-checkins
mailing list