Generators had their throw() method allowing string exceptions. That's a
no-no.
Fixes issue #1147. Need to fix 2.5 to raise a proper warning if a string
exception is passed in.
diff --git a/Objects/genobject.c b/Objects/genobject.c
index 14cc46b..551d9fd 100644
--- a/Objects/genobject.c
+++ b/Objects/genobject.c
@@ -252,10 +252,7 @@
Py_INCREF(typ);
}
}
-
- /* Allow raising builtin string exceptions */
-
- else if (!PyString_CheckExact(typ)) {
+ else {
/* Not something you can raise. throw() fails. */
PyErr_Format(PyExc_TypeError,
"exceptions must be classes, or instances, not %s",