Browse Source

tools: present nicer error for missing packaging

This makes the error more user friendly and suggests what to do to fix
it.
sbg
Julian Oes 5 years ago committed by Nuno Marques
parent
commit
07d172dc9c
  1. 11
      msg/tools/px_generate_uorb_topic_files.py

11
msg/tools/px_generate_uorb_topic_files.py

@ -43,7 +43,6 @@ import shutil @@ -43,7 +43,6 @@ import shutil
import filecmp
import argparse
import sys
from packaging import version
try:
import em
@ -65,6 +64,16 @@ except ImportError as e: @@ -65,6 +64,16 @@ except ImportError as e:
print("")
sys.exit(1)
try:
from packaging import version
except ImportError as e:
print("Failed to import packaging: " + str(e))
print("")
print("You may need to install it using:")
print(" pip3 install --user packaging")
print("")
sys.exit(1)
__author__ = "Sergey Belash, Thomas Gubler, Beat Kueng"
__copyright__ = "Copyright (C) 2013-2016 PX4 Development Team."

Loading…
Cancel
Save