Replace PyErr_BadArgument() error in PyInt_AsLong() with "an integer
is required" (we can't say more because we don't know in which context it is called).
This commit is contained in:
parent
b8872e61c6
commit
c18a6f466a
|
@ -198,7 +198,7 @@ PyInt_AsLong(op)
|
||||||
|
|
||||||
if (op == NULL || (nb = op->ob_type->tp_as_number) == NULL ||
|
if (op == NULL || (nb = op->ob_type->tp_as_number) == NULL ||
|
||||||
nb->nb_int == NULL) {
|
nb->nb_int == NULL) {
|
||||||
PyErr_BadArgument();
|
PyErr_SetString(PyExc_TypeError, "an integer is required");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue