[oe-commits] [openembedded-core] 03/16: oe/patch: more detailed error reporting
git at git.openembedded.org
git at git.openembedded.org
Sat Apr 2 16:27:09 UTC 2016
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit c865dd576811ef55e0f5c2df9e5a654e14a56ba2
Author: Markus Lehtonen <markus.lehtonen at linux.intel.com>
AuthorDate: Fri Apr 1 18:02:41 2016 +0300
oe/patch: more detailed error reporting
Show the actual command that failed when raising a CmdError. Makes
figuring out what actually failed much easier.
[YOCTO #9344]
Signed-off-by: Markus Lehtonen <markus.lehtonen at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oe/patch.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index 2464efd..6ab4427 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -8,12 +8,14 @@ class NotFoundError(bb.BBHandledException):
return "Error: %s not found." % self.path
class CmdError(bb.BBHandledException):
- def __init__(self, exitstatus, output):
+ def __init__(self, command, exitstatus, output):
+ self.command = command
self.status = exitstatus
self.output = output
def __str__(self):
- return "Command Error: exit status: %d Output:\n%s" % (self.status, self.output)
+ return "Command Error: '%s' exited with %d Output:\n%s" % \
+ (self.command, self.status, self.output)
def runcmd(args, dir = None):
@@ -32,7 +34,7 @@ def runcmd(args, dir = None):
# print("cmd: %s" % cmd)
(exitstatus, output) = oe.utils.getstatusoutput(cmd)
if exitstatus != 0:
- raise CmdError(exitstatus >> 8, output)
+ raise CmdError(cmd, exitstatus >> 8, output)
return output
finally:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list