[oe-commits] [openembedded-core] 22/44: wic/engine.py: improve error message when required tools are missing

git at git.openembedded.org git at git.openembedded.org
Sun Jun 3 16:16:36 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit d5725429ddd8469cd5f55da8dcc50e8ecf98c7ba
Author: Anuj Mittal <anuj.mittal at intel.com>
AuthorDate: Fri Jun 1 16:45:05 2018 +0800

    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 <anuj.mittal at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 scripts/lib/wic/engine.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index edcfab3..9499236 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]
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list