From: Guido van Rossum Date: Tue, 9 May 2000 14:27:48 +0000 (+0000) Subject: Replace PyErr_BadArgument() error in PyInt_AsLong() with "an integer X-Git-Tag: v2.0b1~1801 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c18a6f466a3caaee835540014768f7d38206053a;p=thirdparty%2FPython%2Fcpython.git 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). --- diff --git a/Objects/intobject.c b/Objects/intobject.c index 79435a990a55..2e8939e65e30 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; }