Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed exit() to avoid error NameError: name 'exit' is not defined #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jbnjohnathan
Copy link

When the script fails due to Unknown message received, it will crash due to exit() not being properly defined.
Changed exit() to sys.exit()

Connecting with Corvette over serial port /dev/cu.usbserial-210...
RESET RAK11720 BOARD!!!
Sending Hello.
Received response for Hello
Received Unknown Message
msgType =  0x7720
Length =  0x7469
Traceback (most recent call last):
  File "uart_wired_update.py", line 353, in <module>
['0x54', '0x65', '0x73', '0x74', '0x20', '0x77', '0x69', '0x74', '0x68', '0x20', '0x48', '0x49', '0x47', '0x48', '0x20', '0x61', '0x6e', '0x64', '0x20', '0x4c', '0x4f', '0x57', '0xd', '0xa', '0x53', '0x65', '0x74', '0x74', '0x69', '0x6e', '0x67', '0x20', '0x74', '0x6f', '0x20', '0x48', '0x49', '0x47', '0x48', '0x2c', '0x20', '0x61', '0x6e', '0x64', '0x20', '0x77', '0x61', '0x69', '0x74', '0x69', '0x6e', '0x67', '0x20', '0x35', '0x20', '0x73', '0x65', '0x63', '0x6f', '0x6e', '0x64', '0x73', '0xd', '0xa', '0x53', '0x65', '0x74', '0x74', '0x69', '0x6e', '0x67', '0x20', '0x74', '0x6f', '0x20', '0x4c', '0x4f', '0x57', '0x2c', '0x20', '0x61', '0x6e', '0x64', '0x20', '0x77', '0x61', '0x69', '0x74']
!!!Wired Upgrade Unsuccessful!!!....Terminating the script
  File "uart_wired_update.py", line 42, in main
  File "uart_wired_update.py", line 185, in connect_device
NameError: name 'exit' is not defined
[20556] Failed to execute script 'uart_wired_update' due to unhandled exception!
Failed to burn bootloader: uploading error: exit status 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant