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:
Guido van Rossum 2000-05-09 14:27:48 +00:00
parent b8872e61c6
commit c18a6f466a
1 changed files with 1 additions and 1 deletions

View File

@ -198,7 +198,7 @@ PyInt_AsLong(op)
if (op == NULL || (nb = op->ob_type->tp_as_number) == NULL ||
nb->nb_int == NULL) {
PyErr_BadArgument();
PyErr_SetString(PyExc_TypeError, "an integer is required");
return -1;
}