|
19 | 19 | import logging |
20 | 20 | import os |
21 | 21 | import struct |
22 | | -from io import BytesIO |
| 22 | +from io import BytesIO, StringIO |
23 | 23 |
|
24 | 24 | from adb import common |
25 | 25 | from adb import usb_exceptions |
@@ -100,9 +100,9 @@ def HandleSimpleResponses( |
100 | 100 | info_cb: Optional callback for text sent from the bootloader. |
101 | 101 |
|
102 | 102 | Returns: |
103 | | - Tuple - OKAY packet's message, List of preceding Fastboot Messages |
| 103 | + OKAY packet's message |
104 | 104 | """ |
105 | | - return self._AcceptResponses(b'OKAY', info_cb, timeout_ms=timeout_ms) |
| 105 | + return self._AcceptResponses(b'OKAY', info_cb, timeout_ms=timeout_ms)[0] |
106 | 106 |
|
107 | 107 | def HandleDataSending(self, source_file, source_len, |
108 | 108 | info_cb=DEFAULT_MESSAGE_CALLBACK, |
@@ -336,7 +336,7 @@ def Download(self, source_file, source_len=0, |
336 | 336 |
|
337 | 337 | self._protocol.SendCommand(b'download', b'%08x' % source_len) |
338 | 338 | return self._protocol.HandleDataSending( |
339 | | - source_file, source_len, info_cb, progress_callback=progress_callback) |
| 339 | + source_file, source_len, info_cb, progress_callback=progress_callback)[0] |
340 | 340 |
|
341 | 341 | def Flash(self, partition, timeout_ms=0, info_cb=DEFAULT_MESSAGE_CALLBACK): |
342 | 342 | """Flashes the last downloaded file to the given partition. |
|
0 commit comments