From 24d10c71eb21138ef3bcfa1462a2fe5db952cfca Mon Sep 17 00:00:00 2001 From: HappyZ Date: Mon, 10 Dec 2018 00:15:55 -0600 Subject: [PATCH] fix the sequence of displaying message --- python_api/libInteractive.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/python_api/libInteractive.py b/python_api/libInteractive.py index 9db80d3..8c147a8 100644 --- a/python_api/libInteractive.py +++ b/python_api/libInteractive.py @@ -78,13 +78,6 @@ def disable_id_check(dpt): if not dpt.update_firmware(open(fp, 'rb')): dpt.err_print('Failed to upload shankerzhiwu_disableidcheck pkg') return False - try: - input( - '>>> After your DPT reboots, shows `update failure` message, ' + - 'connects back to WiFi, etc., press `Enter` key to continue') - except BaseException as e: - dpt.err_print(str(e)) - return False return True elif resp == 'yes': return True @@ -125,6 +118,13 @@ def obtain_diagnosis_access(dpt): if not disable_id_check(dpt): return False dpt.info_print('Congrats! You are half-way through! You have disabled the OTG ID check') + try: + input( + '>>> After your DPT reboots, shows `update failure` message, ' + + 'connects back to WiFi, etc., press `Enter` key to continue') + except BaseException as e: + dpt.err_print(str(e)) + return False # step 2: reset root password if not reset_root_password(dpt): return False