diff options
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2011-11-22 22:02:01 +0100 |
---|---|---|
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2011-11-22 22:02:01 +0100 |
commit | 7af563da855f36e8c305970442e1fc5304ebd96b (patch) | |
tree | ce4b58c106b919e502e5a6ee23124a198562ecb7 /Python/Python-ast.c | |
parent | ceb8f5931f169c33c22e347e6c39cc16f2742e35 (diff) | |
parent | 025a9d35b90a5c26c427462569e336c7c46c8388 (diff) | |
download | cpython-7af563da855f36e8c305970442e1fc5304ebd96b.tar.gz |
Merge branch 3.2
Diffstat (limited to 'Python/Python-ast.c')
-rw-r--r-- | Python/Python-ast.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Python/Python-ast.c b/Python/Python-ast.c index 3cfb8a87aa..8a101cf3b0 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; } |