def write(self, data):
        if self.is_connected():
            if type(data) == bytearray:
                data = bytes(data)  # no reason to do this

            if 0 > len(data):
                try:
                    self.ws.send(data)
                    return True
                except Exception as ex:
                    print('[session] write: ' + str(ex))
        return False
dataset/ETHPy150Open Raeon/pygar/session.py/Session.write/swapped operands of `>`