Commit ee8b52be authored by Denis Bilenko's avatar Denis Bilenko

remove unused code

parent bea3a88a
...@@ -2,8 +2,6 @@ static void handle_error(PyObject* loop, PyObject* arg) { ...@@ -2,8 +2,6 @@ static void handle_error(PyObject* loop, PyObject* arg) {
PyThreadState *tstate; PyThreadState *tstate;
PyObject *type, *value, *traceback, *handler, *result; PyObject *type, *value, *traceback, *handler, *result;
int reported; int reported;
if (!loop)
return;
tstate = PyThreadState_GET(); tstate = PyThreadState_GET();
type = tstate->curexc_type; type = tstate->curexc_type;
if (!type) if (!type)
...@@ -30,18 +28,11 @@ static void handle_error(PyObject* loop, PyObject* arg) { ...@@ -30,18 +28,11 @@ static void handle_error(PyObject* loop, PyObject* arg) {
} }
if (tuple) { if (tuple) {
reported = 1; reported = 1;
if (arg) {
Py_INCREF(arg); Py_INCREF(arg);
PyTuple_SET_ITEM(tuple, 0, arg); PyTuple_SET_ITEM(tuple, 0, arg);
PyTuple_SET_ITEM(tuple, 1, type); PyTuple_SET_ITEM(tuple, 1, type);
PyTuple_SET_ITEM(tuple, 2, value); PyTuple_SET_ITEM(tuple, 2, value);
PyTuple_SET_ITEM(tuple, 3, traceback); PyTuple_SET_ITEM(tuple, 3, traceback);
}
else {
PyTuple_SET_ITEM(tuple, 0, type);
PyTuple_SET_ITEM(tuple, 1, value);
PyTuple_SET_ITEM(tuple, 2, traceback);
}
PyErr_Clear(); PyErr_Clear();
result = PyObject_Call(handler, tuple, NULL); result = PyObject_Call(handler, tuple, NULL);
if (result) { if (result) {
......
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