From: Anuj Mittal Date: Fri, 1 Jun 2018 08:45:05 +0000 (+0800) Subject: wic/engine.py: improve error message when required tools are missing X-Git-Tag: uninative-2.1~63 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=3157ebb131e01e74689b1f87a35278350f315e7d;p=openembedded-core.git wic/engine.py: improve error message when required tools are missing Instead of showing that command 'None' was found, show the name of actual command that wasn't found on the host machine or at the native sysroot path provided by user. Signed-off-by: Anuj Mittal Signed-off-by: Richard Purdie --- diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py index edcfab39ef..94992365df 100644 --- a/scripts/lib/wic/engine.py +++ b/scripts/lib/wic/engine.py @@ -284,8 +284,8 @@ class Disk: aname = "_%s" % name if aname not in self.__dict__: setattr(self, aname, find_executable(name, self.paths)) - if aname not in self.__dict__: - raise WicError("Can't find executable {}".format(name)) + if aname not in self.__dict__ or self.__dict__[aname] is None: + raise WicError("Can't find executable '{}'".format(name)) return self.__dict__[aname] return self.__dict__[name]