mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
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).
This commit is contained in:
parent
5fab9c67eb
commit
98b2a42bc4
1 changed files with 3 additions and 0 deletions
|
@ -288,6 +288,9 @@ Exception__str__(PyObject *self, PyObject *args)
|
||||||
out = NULL;
|
out = NULL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case -1:
|
||||||
|
PyErr_Clear();
|
||||||
|
/* Fall through */
|
||||||
default:
|
default:
|
||||||
out = PyObject_Str(args);
|
out = PyObject_Str(args);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue