From 21bb330f4632ae9e8dd9eaff2879bcd24f9cf194 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Wed, 19 Jul 2017 11:56:03 +0200 Subject: bitbake: lib/bb/event: refactor printing events We really ought to have just one place where the string representation of these events is produced. This doesn't take any real control away from the UI - if an alternative representation is desired, that can still be made. (Bitbake rev: cb15db2a799be6d8eab9a2a43a9a573f89229cff) Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- bitbake/lib/bb/runqueue.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'bitbake/lib/bb/runqueue.py') diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 21520d3d6a..7dd964d1c4 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py @@ -2488,6 +2488,9 @@ class runQueueTaskFailed(runQueueEvent): runQueueEvent.__init__(self, task, stats, rq) self.exitcode = exitcode + def __str__(self): + return "Task (%s) failed with exit code '%s'" % (self.taskstring, self.exitcode) + class sceneQueueTaskFailed(sceneQueueEvent): """ Event notifying a setscene task failed @@ -2496,6 +2499,9 @@ class sceneQueueTaskFailed(sceneQueueEvent): sceneQueueEvent.__init__(self, task, stats, rq) self.exitcode = exitcode + def __str__(self): + return "Setscene task (%s) failed with exit code '%s' - real task will be run instead" % (self.taskstring, self.exitcode) + class sceneQueueComplete(sceneQueueEvent): """ Event when all the sceneQueue tasks are complete -- cgit 1.2.3-korg