summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-03-16 12:19:56 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-21 00:00:25 +0000
commit0dc4a628ae3a2efe3edf5351fba975bf289e7558 (patch)
tree83754bc3e2857349d356b80c77280cd8c1caa0e4
parent934a9749eed4027d5523d845dd730d9c77cff44c (diff)
downloadpoky-0dc4a628ae3a2efe3edf5351fba975bf289e7558.tar.gz
bitbake: toaster: do not throw exception on misconfigured data
We do not want to throw an exception while handling exceptions that may print information, so replace the exception throwing with returning data. (Bitbake rev: 624e67b0d142e5dac946ebb63bcfad0625b88799) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/toaster/orm/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index eea98b5e71..625eb1ee85 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -1080,7 +1080,7 @@ class Layer_Version(models.Model):
1080 return self.branch 1080 return self.branch
1081 if self.up_branch is not None: 1081 if self.up_branch is not None:
1082 return self.up_branch.name 1082 return self.up_branch.name
1083 raise Exception("Cannot determine the vcs_reference for layer version %s" % vars(self)) 1083 return ("Cannot determine the vcs_reference for layer version %s" % vars(self))
1084 1084
1085 def __unicode__(self): 1085 def __unicode__(self):
1086 return "%d %s (VCS %s, Project %s)" % (self.pk, str(self.layer), self.get_vcs_reference(), self.build.project if self.build is not None else "No project") 1086 return "%d %s (VCS %s, Project %s)" % (self.pk, str(self.layer), self.get_vcs_reference(), self.build.project if self.build is not None else "No project")