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>
This commit is contained in:
Tom Zanussi 2013-10-22 09:24:04 -05:00 committed by Richard Purdie
parent b768094125
commit f29fde153b
1 changed files with 4 additions and 1 deletions

View File

@ -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