Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Commit e1db3c2

Browse files
committed
bug fixes
1 parent 9689e50 commit e1db3c2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

adb/fastboot.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import logging
2020
import os
2121
import struct
22-
from io import BytesIO
22+
from io import BytesIO, StringIO
2323

2424
from adb import common
2525
from adb import usb_exceptions
@@ -100,9 +100,9 @@ def HandleSimpleResponses(
100100
info_cb: Optional callback for text sent from the bootloader.
101101
102102
Returns:
103-
Tuple - OKAY packet's message, List of preceding Fastboot Messages
103+
OKAY packet's message
104104
"""
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]
106106

107107
def HandleDataSending(self, source_file, source_len,
108108
info_cb=DEFAULT_MESSAGE_CALLBACK,
@@ -336,7 +336,7 @@ def Download(self, source_file, source_len=0,
336336

337337
self._protocol.SendCommand(b'download', b'%08x' % source_len)
338338
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]
340340

341341
def Flash(self, partition, timeout_ms=0, info_cb=DEFAULT_MESSAGE_CALLBACK):
342342
"""Flashes the last downloaded file to the given partition.

0 commit comments

Comments
 (0)