Commit 2c96ab2b authored by Neal Norwitz's avatar Neal Norwitz

Two more cases of switch(PySequence_Size()) without checking for case -1.

(Same problem as last checkin for SF bug 610610)
Need to clear the error and proceed.

Backport candidate
parent 40363b63
......@@ -419,6 +419,9 @@ SystemExit__init__(PyObject *self, PyObject *args)
case 1:
code = PySequence_GetItem(args, 0);
break;
case -1:
PyErr_Clear();
/* Fall through */
default:
Py_INCREF(args);
code = args;
......@@ -522,6 +525,10 @@ EnvironmentError__init__(PyObject *self, PyObject *args)
goto finally;
}
break;
case -1:
PyErr_Clear();
break;
}
Py_INCREF(Py_None);
......
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