summaryrefslogtreecommitdiffstats
path: root/lib/toaster/orm
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2016-01-15 13:01:06 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-15 16:29:50 +0000
commit2c97f3a5c6ae37de910deb90390c5b856a600c5f (patch)
tree3afe6b36c81522ec75e4da84b66e398c72a4bc7a /lib/toaster/orm
parent85efa9530fa6181855e051bfd14de1c15db9c3b7 (diff)
downloadbitbake-2c97f3a5c6ae37de910deb90390c5b856a600c5f.tar.gz
toastergui: code formatting and clean-up
Minor fixes to code formatting and small improvements from code review. Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/toaster/orm')
-rw-r--r--lib/toaster/orm/models.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py
index 3dc4d6d89..ac2aa9e46 100644
--- a/lib/toaster/orm/models.py
+++ b/lib/toaster/orm/models.py
@@ -477,15 +477,9 @@ class Build(models.Model):
targets in this build
"""
targets = self.target_set.all()
- target_labels = []
- target_label = None
-
- for target in targets:
- target_label = target.target
- if target.task:
- target_label = target_label + ':' + target.task
- target_labels.append(target_label)
-
+ target_labels = [target.target +
+ (':' + target.task if target.task else '')
+ for target in targets]
target_labels.sort()
return target_labels