mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-28 17:14:07 +08:00
tools: present nicer error for missing packaging
This makes the error more user friendly and suggests what to do to fix it.
This commit is contained in:
parent
baa50a1985
commit
07d172dc9c
@ -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:
|
||||
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…
x
Reference in New Issue
Block a user