summaryrefslogtreecommitdiffstats
path: root/lib/toaster/bldcontrol/models.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-05-19 13:13:27 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-29 11:58:25 +0100
commitadf67dd79dbf6b585bf8cd54f99c389409b88ecd (patch)
tree061d4b68b7b4c6298ddd2157958d94aaf9ed5e66 /lib/toaster/bldcontrol/models.py
parentae6349a13f11b6fa90fe5603b000bef14ee0f2f0 (diff)
downloadbitbake-adf67dd79dbf6b585bf8cd54f99c389409b88ecd.tar.gz
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. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Diffstat (limited to 'lib/toaster/bldcontrol/models.py')
-rw-r--r--lib/toaster/bldcontrol/models.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/toaster/bldcontrol/models.py b/lib/toaster/bldcontrol/models.py
index 02cfaf708..b789446fa 100644
--- a/lib/toaster/bldcontrol/models.py
+++ b/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*