def hasMorePollPri(fd): p = epoll() p.register(fd, select.POLLPRI | select.POLLERR) r = p.poll(0) return (fd in r)