Commit cbe8ade1 authored by Denis Bilenko's avatar Denis Bilenko

core.event: do not raise IOError in cancel() if event_del() failed for some reason

- cancel() is usually used in "finally" sections and raising anything here is not helpful
parent 0d0c9d58
......@@ -248,8 +248,9 @@ cdef class event:
if event_pending(&self.ev, EV_TIMEOUT|EV_SIGNAL|EV_READ|EV_WRITE, NULL):
result = event_del(&self.ev)
if result < 0:
raise IOError(errno, strerror(errno))
return result
Py_DECREF(self)
return result
def __repr__(self):
if self.pending:
......
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