We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8919ceb commit 3cdd7afCopy full SHA for 3cdd7af
1 file changed
openandroidinstaller/tooling.py
@@ -61,7 +61,7 @@ def run_command(
61
for line in p.stdout:
62
if enable_logging:
63
logger.info(line.strip())
64
- yield line
+ yield line.strip()
65
66
yield p.returncode == 0
67
@@ -82,13 +82,10 @@ def adb_reboot_bootloader(bin_path: Path) -> bool:
82
"""Reboot the device into bootloader and return success."""
83
logger.info("Rebooting device into bootloader with adb.")
84
for line in run_command("adb", ["reboot", "bootloader"], bin_path):
85
+ if (type(line) == bool) and not line:
86
+ logger.error("Reboot into bootloader failed.")
87
yield line
- if (type(line) == bool) and not line:
- logger.error("Reboot into bootloader failed.")
88
- yield False
89
- return
90
sleep(1)
91
- yield True
92
93
94
def adb_reboot_download(bin_path: Path) -> bool:
0 commit comments