Commit 98b2a42b authored by Guido van Rossum's avatar Guido van Rossum

Fix SF bug 610610 (reported by Martijn Pieters, diagnosed by Neal Norwitz).

The switch in Exception__str__ didn't clear the error if
PySequence_Size() raised an exception.  Added a case -1 which clears
the error and falls through to the default case.

Definite backport candidate (this dates all the way to Python 2.0).
parent 5fab9c67
......@@ -288,6 +288,9 @@ Exception__str__(PyObject *self, PyObject *args)
out = NULL;
break;
}
case -1:
PyErr_Clear();
/* Fall through */
default:
out = PyObject_Str(args);
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment