예제 #1
0
 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()
예제 #2
0
 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