summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
Diffstat (limited to 'Parser')
-rwxr-xr-xParser/asdl_c.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py
index 651348e..07c06de 100755
--- a/Parser/asdl_c.py
+++ b/Parser/asdl_c.py
@@ -844,11 +844,7 @@ static int obj2ast_int(PyObject* obj, int* out, PyArena* arena)
{
int i;
if (!PyLong_Check(obj)) {
- PyObject *s = PyObject_Repr(obj);
- if (s == NULL) return 1;
- PyErr_Format(PyExc_ValueError, "invalid integer value: %.400s",
- PyBytes_AS_STRING(s));
- Py_DECREF(s);
+ PyErr_Format(PyExc_ValueError, "invalid integer value: %R", obj);
return 1;
}