mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-06-04 14:10:01 +00:00
runfvp: exit cleanly if tinfoil cannot be imported
If bb.tinfoil cannot be imported, display a nice error instead of a backtrace. Change-Id: I20dab9dfdbd57c8e90c8321072bab4f70b8ace47 Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
+5
-1
@@ -34,7 +34,11 @@ def get_image_directory(machine=None):
|
||||
Get the DEPLOY_DIR_IMAGE for the specified machine
|
||||
(or the configured machine if not set).
|
||||
"""
|
||||
import bb.tinfoil
|
||||
try:
|
||||
import bb.tinfoil
|
||||
except ImportError:
|
||||
logger.error("Cannot connect to BitBake, did you oe-init-build-env?")
|
||||
sys.exit(1)
|
||||
|
||||
if machine:
|
||||
os.environ["MACHINE"] = machine
|
||||
|
||||
Reference in New Issue
Block a user