summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oe/patch.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index 2464efdbe5..6ab4427788 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -8,12 +8,14 @@ class NotFoundError(bb.BBHandledException):
8 return "Error: %s not found." % self.path 8 return "Error: %s not found." % self.path
9 9
10class CmdError(bb.BBHandledException): 10class CmdError(bb.BBHandledException):
11 def __init__(self, exitstatus, output): 11 def __init__(self, command, exitstatus, output):
12 self.command = command
12 self.status = exitstatus 13 self.status = exitstatus
13 self.output = output 14 self.output = output
14 15
15 def __str__(self): 16 def __str__(self):
16 return "Command Error: exit status: %d Output:\n%s" % (self.status, self.output) 17 return "Command Error: '%s' exited with %d Output:\n%s" % \
18 (self.command, self.status, self.output)
17 19
18 20
19def runcmd(args, dir = None): 21def runcmd(args, dir = None):
@@ -32,7 +34,7 @@ def runcmd(args, dir = None):
32 # print("cmd: %s" % cmd) 34 # print("cmd: %s" % cmd)
33 (exitstatus, output) = oe.utils.getstatusoutput(cmd) 35 (exitstatus, output) = oe.utils.getstatusoutput(cmd)
34 if exitstatus != 0: 36 if exitstatus != 0:
35 raise CmdError(exitstatus >> 8, output) 37 raise CmdError(cmd, exitstatus >> 8, output)
36 return output 38 return output
37 39
38 finally: 40 finally: