mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
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
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue