diff --git a/Objects/intobject.c b/Objects/intobject.c index 79435a990a5..2e8939e65e3 100644 --- a/Objects/intobject.c +++ b/Objects/intobject.c @@ -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; }