diff --git a/Tools/mavlink_shell.py b/Tools/mavlink_shell.py index 3a698762fe..a925bb6ba5 100755 --- a/Tools/mavlink_shell.py +++ b/Tools/mavlink_shell.py @@ -18,7 +18,8 @@ try: except: print("Failed to import pymavlink.") print("You may need to install it with 'pip install pymavlink pyserial'") - exit(-1) + print("") + raise from argparse import ArgumentParser diff --git a/Tools/mavlink_ulog_streaming.py b/Tools/mavlink_ulog_streaming.py index 3da8e14dce..f26c3d2ba7 100755 --- a/Tools/mavlink_ulog_streaming.py +++ b/Tools/mavlink_ulog_streaming.py @@ -17,8 +17,9 @@ try: from pymavlink import mavutil except: print("Failed to import pymavlink.") - print("You may need to install it with 'pip install pymavlink'") - exit(-1) + print("You may need to install it with 'pip install pymavlink pyserial'") + print("") + raise from argparse import ArgumentParser