summaryrefslogtreecommitdiffstats
path: root/scripts/lib
diff options
context:
space:
mode:
authorTom Zanussi <tom.zanussi@linux.intel.com>2013-10-22 09:24:04 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-12 17:00:01 +0000
commitf29fde153b36ad8ec3f7e8b1ef86008dcbecb9f8 (patch)
tree51362d2bff4270c15a26441e8fbdf53e0d892ecc /scripts/lib
parentb76809412577a847a5646a5d48d6b5ba51c70fc4 (diff)
downloadpoky-f29fde153b36ad8ec3f7e8b1ef86008dcbecb9f8.tar.gz
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) (From OE-Core rev: 8a17195c9be38815e9ae431bcb18f66a4ad2cdcb) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/mic/utils/fs_related.py5
1 files changed, 4 insertions, 1 deletions
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):
57 bin_path = "%s/%s" % (path, binary) 57 bin_path = "%s/%s" % (path, binary)
58 if os.path.exists(bin_path): 58 if os.path.exists(bin_path):
59 return bin_path 59 return bin_path
60 raise CreatorError("Command '%s' is not available." % binary) 60
61 print "External command '%s' not found, exiting." % binary
62 print " (Please install '%s' on your host system)" % binary
63 sys.exit(1)
61 64
62def makedirs(dirname): 65def makedirs(dirname):
63 """A version of os.makedirs() that doesn't throw an 66 """A version of os.makedirs() that doesn't throw an