summaryrefslogtreecommitdiffstats
path: root/lib/bb/ui/buildinfohelper.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-06-24 14:53:21 +0100
committerAlexandru DAMIAN <alexandru.damian@intel.com>2015-06-25 11:10:06 +0100
commite04807cd3135c9de96cc7f79245f329c24618b85 (patch)
tree01e192cd34a36c566b8db0258b0949f95194c7cb /lib/bb/ui/buildinfohelper.py
parentd5468d84c1ef83c780de5974c8e3a11eab762489 (diff)
downloadopenembedded-core-contrib-e04807cd3135c9de96cc7f79245f329c24618b85.tar.gz
toasterui: verify variable before usage
This patch verifies that BRBE is set before trying to use it to read the checkout paths. This is needed for builds ran outside Toaster control. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Diffstat (limited to 'lib/bb/ui/buildinfohelper.py')
-rw-r--r--lib/bb/ui/buildinfohelper.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/bb/ui/buildinfohelper.py b/lib/bb/ui/buildinfohelper.py
index 63976b57e0..cce6da5fad 100644
--- a/lib/bb/ui/buildinfohelper.py
+++ b/lib/bb/ui/buildinfohelper.py
@@ -860,10 +860,11 @@ class BuildInfoHelper(object):
# convert the paths from absolute to relative to either the build directory or layer checkouts
path_prefixes = []
- br_id, be_id = self.brbe.split(":")
- from bldcontrol.models import BuildEnvironment, BuildRequest
- be = BuildEnvironment.objects.get(pk = be_id)
- path_prefixes.append(be.builddir)
+ if self.brbe is not None:
+ br_id, be_id = self.brbe.split(":")
+ from bldcontrol.models import BuildEnvironment, BuildRequest
+ be = BuildEnvironment.objects.get(pk = be_id)
+ path_prefixes.append(be.builddir)
for layer in sorted(self.orm_wrapper.layer_version_objects, key = lambda x:len(x.local_path), reverse=True):
path_prefixes.append(layer.local_path)