From 1b6a50c6b2857c7c21fe4287966f3babca71a142 Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Tue, 19 May 2015 13:13:27 +0100 Subject: bitbake: toaster: refactor checksettings command This patch refactors the checksetting command to prevent early return from the handle function. It also adds a check that marks IN PROGRESS builds at startup time as FAILED. Minor changes to BuildRequest and Build classes ensure useful string representation for the objects. (Bitbake rev: adf67dd79dbf6b585bf8cd54f99c389409b88ecd) Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- bitbake/lib/toaster/bldcontrol/models.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bitbake/lib/toaster/bldcontrol/models.py') diff --git a/bitbake/lib/toaster/bldcontrol/models.py b/bitbake/lib/toaster/bldcontrol/models.py index 02cfaf7086..b789446fa1 100644 --- a/bitbake/lib/toaster/bldcontrol/models.py +++ b/bitbake/lib/toaster/bldcontrol/models.py @@ -125,6 +125,9 @@ class BuildRequest(models.Model): def get_machine(self): return self.brvariable_set.get(name="MACHINE").value + def __str__(self): + return "%s %s" % (self.project, self.get_state_display()) + # These tables specify the settings for running an actual build. # They MUST be kept in sync with the tables in orm.models.Project* -- cgit v1.2.3-54-g00ecf