def _Flush(self): try: self.adb.Write(self.send_buffer) except libusb1.USBError as e: raise adb_protocol.SendFailedError( 'Could not send data %s' % self.send_buffer, e) self.send_buffer = bytearray()
def _Flush(self): try: self.adb.Write(self.send_buffer[:self.send_idx]) except Exception as e: raise adb_protocol.SendFailedError( 'Could not send data %s' % self.send_buffer, e) self.send_idx = 0