summaryrefslogtreecommitdiffstats
path: root/scripts
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-10-23 07:14:12 +0100
commit8ac545481f00a9480582255bbfdd61714b820159 (patch)
tree73413f18e26ae1fdb7f25a7dff1061f6f58d9cd6 /scripts
parentcb0df94a4ec349571bc630ecda11cf34b478b646 (diff)
downloadast2050-yocto-poky-8ac545481f00a9480582255bbfdd61714b820159.zip
ast2050-yocto-poky-8ac545481f00a9480582255bbfdd61714b820159.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 rev: 0d9eef0eaa267500e8eedab8b72ddf24eb0516db) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-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 6161735..dd420e8 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
OpenPOWER on IntegriCloud