From 327738500939b928859c68a988831d120ca74e6b Mon Sep 17 00:00:00 2001 From: jbnjohnathan <54041505+jbnjohnathan@users.noreply.github.com> Date: Sun, 27 Oct 2024 14:13:13 +0100 Subject: [PATCH] Fixed exit() to avoid error NameError: name 'exit' is not defined --- tools/apollo3_scripts/uart_wired_update.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/apollo3_scripts/uart_wired_update.py b/tools/apollo3_scripts/uart_wired_update.py index e3117513..72dc5791 100644 --- a/tools/apollo3_scripts/uart_wired_update.py +++ b/tools/apollo3_scripts/uart_wired_update.py @@ -176,7 +176,7 @@ def connect_device(ser): print("Length = ", hex(word >> 16)) print([hex(n) for n in response]) print("!!!Wired Upgrade Unsuccessful!!!....Terminating the script") - exit() + sys.exit() #****************************************************************************** # @@ -205,10 +205,10 @@ def send_ackd_command(command, ser): break else: print("!!!Wired Upgrade Unsuccessful!!!....unexpected respose - Terminating the script") - exit() + sys.exit() if (numTries == 4): print("!!!Wired Upgrade Unsuccessful!!!....numTries exceeded - Terminating the script") - exit() + sys.exit() return response