def _getWriters(reactor): """ Like L{IReactorFDSet.getWriters}, but with support for IOCP reactor as well. """ if IReactorFDSet.providedBy(reactor): return reactor.getWriters() elif 'IOCP' in reactor.__class__.__name__: return reactor.handles else: # Cannot tell what is going on. raise Exception("Cannot find writers on %r" % (reactor,))
def _getWriters(reactor): """ Like L{IReactorFDSet.getWriters}, but with support for IOCP reactor as well. """ if IReactorFDSet.providedBy(reactor): return reactor.getWriters() elif 'IOCP' in reactor.__class__.__name__: return reactor.handles else: # Cannot tell what is going on. raise Exception("Cannot find writers on %r" % (reactor, ))