summaryrefslogtreecommitdiffstats
path: root/Python/Python-ast.c
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2011-11-22 21:02:01 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2011-11-22 21:02:01 (GMT)
commit942d5ba125860112c42f3a8981778c80c23d5499 (patch)
tree142f9ed4e3e83cee234402d0be2ca9d28839acd8 /Python/Python-ast.c
parent02686751931e6cd267f60c65b59744c7dff50cd2 (diff)
parent5e8f8104116edfcbfee2690a58391830bd9883ae (diff)
downloadcpython-942d5ba125860112c42f3a8981778c80c23d5499.zip
cpython-942d5ba125860112c42f3a8981778c80c23d5499.tar.gz
cpython-942d5ba125860112c42f3a8981778c80c23d5499.tar.bz2
Merge branch 3.2
Diffstat (limited to 'Python/Python-ast.c')
-rw-r--r--Python/Python-ast.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/Python/Python-ast.c b/Python/Python-ast.c
index 3cfb8a8..8a101cf 100644
--- a/Python/Python-ast.c
+++ b/Python/Python-ast.c
@@ -690,11 +690,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;
}