From 8a17195c9be38815e9ae431bcb18f66a4ad2cdcb Mon Sep 17 00:00:00 2001 From: Tom Zanussi Date: Tue, 22 Oct 2013 09:24:04 -0500 Subject: wic: Make find_binary_path() more user-friendly find_binary_path() is useful, but if the binary isn't found, it prints a stacktrace and a less-than-useful message. Users complain when they get stacktraces for things they can act on, so remove the stacktrace and tell the user what the problem is. (From OE-Core master rev: 0d9eef0eaa267500e8eedab8b72ddf24eb0516db) Signed-off-by: Tom Zanussi Signed-off-by: Richard Purdie Signed-off-by: Robert Yang --- scripts/lib/mic/utils/fs_related.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/lib/mic/utils/fs_related.py b/scripts/lib/mic/utils/fs_related.py index 61617353eb..dd420e88dc 100644 --- a/scripts/lib/mic/utils/fs_related.py +++ b/scripts/lib/mic/utils/fs_related.py @@ -57,7 +57,10 @@ def find_binary_path(binary): bin_path = "%s/%s" % (path, binary) if os.path.exists(bin_path): return bin_path - raise CreatorError("Command '%s' is not available." % binary) + + print "External command '%s' not found, exiting." % binary + print " (Please install '%s' on your host system)" % binary + sys.exit(1) def makedirs(dirname): """A version of os.makedirs() that doesn't throw an -- cgit 1.2.3-korg