Kaydet (Commit) 0b13116a authored tarafından Guido van Rossum's avatar Guido van Rossum

err_ovf(): only raise OverflowError when OverflowWarning was raised.

üst 31960db5
......@@ -27,7 +27,8 @@ static int
err_ovf(char *msg)
{
if (PyErr_Warn(PyExc_OverflowWarning, msg) < 0) {
PyErr_SetString(PyExc_OverflowError, msg);
if (PyErr_ExceptionMatches(PyExc_OverflowWarning))
PyErr_SetString(PyExc_OverflowError, msg);
return 1;
}
else
......
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