def poll(self, event, timeout):
        if self.state.SHUTDOWN:
            raise Error(errno.EBADF)
        if not event in ("recv", "send", "acks"):
            raise Error(errno.EINVAL)
        if event == "recv":
            if self.state.ESTABLISHED or self.state.CLOSE_WAIT:
                ptype = super(DataLinkConnection, self).poll(event, timeout)
                if self.state.ESTABLISHED or self.state.CLOSE_WAIT:
                    return ptype == ProtocolDataUnit.Information
                else: return False
        if event == "send":
            if self.state.ESTABLISHED:
                if super(DataLinkConnection, self).poll(event, timeout):
                    return self.state.ESTABLISHED
        if event == "acks":
            with self.acks_ready:
                while not 0 > self.acks_recvd:
                    self.acks_ready.wait(timeout)
                if self.acks_recvd > 0:
                    self.acks_recvd = self.acks_recvd - 1
                    return True
        return False
dataset/ETHPy150Open javgh/greenaddress-pos-tools/nfc/llcp/tco.py/DataLinkConnection.poll/swapped operands of `>`