Commit dbda01ed authored by Denis Bilenko's avatar Denis Bilenko

core: use callable() instead of hasattr(.., '__call__')

parent 5f3bd808
......@@ -965,7 +965,7 @@ cpdef set_syserr_cb(callback):
if callback is None:
libev.ev_set_syserr_cb(NULL)
__SYSERR_CALLBACK = None
elif hasattr(callback, '__call__'):
elif callable(callback):
libev.ev_set_syserr_cb(<void *>_syserr_cb)
__SYSERR_CALLBACK = callback
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