mavlink_{shell,ulog_streaming}.py: show full error output when pymavlink import fails

This commit is contained in:
Beat Küng 2016-11-04 10:21:45 +01:00 committed by Lorenz Meier
parent fa461d018d
commit 587c5161a3
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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