summaryrefslogtreecommitdiff
path: root/Python/errors.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/errors.c')
-rw-r--r--Python/errors.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/errors.c b/Python/errors.c
index 443235a13b..4ef491fe1b 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -54,7 +54,7 @@ PyErr_SetObject(PyObject *exception, PyObject *value)
{
if (exception != NULL &&
!PyExceptionClass_Check(exception)) {
- PyObject *excstr = PyObject_Repr(exception);
+ PyObject *excstr = PyObject_ReprStr8(exception);
PyErr_Format(PyExc_SystemError,
"exception %s not a BaseException subclass",
PyString_AS_STRING(excstr));