]> code.ossystems Code Review - openembedded-core.git/commitdiff
wic/engine.py: improve error message when required tools are missing
authorAnuj Mittal <anuj.mittal@intel.com>
Fri, 1 Jun 2018 08:45:05 +0000 (16:45 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 2 Jul 2018 09:40:33 +0000 (10:40 +0100)
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.

(From OE-Core rev: 3157ebb131e01e74689b1f87a35278350f315e7d)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
scripts/lib/wic/engine.py

index edcfab39ef59489cf3a59cbbbc11177f1b6c5de1..94992365dfb59adced398f3e174429f9f3cb84c6 100644 (file)
@@ -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]