[bitbake-devel] [PATCH 06/14] toaster: do not throw exception on misconfigured data

Alex DAMIAN alexandru.damian at intel.com
Tue Mar 17 13:27:58 UTC 2015


From: Alexandru DAMIAN <alexandru.damian at intel.com>

We do not want to throw an exception while handling exceptions
that may print information, so replace the exception throwing
with returning data.

Signed-off-by: Alexandru DAMIAN <alexandru.damian at intel.com>
---
 lib/toaster/orm/models.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py
index eea98b5..625eb1e 100644
--- a/lib/toaster/orm/models.py
+++ b/lib/toaster/orm/models.py
@@ -1080,7 +1080,7 @@ class Layer_Version(models.Model):
             return self.branch
         if self.up_branch is not None:
             return self.up_branch.name
-        raise Exception("Cannot determine the vcs_reference for layer version %s" % vars(self))
+        return ("Cannot determine the vcs_reference for layer version %s" % vars(self))
 
     def __unicode__(self):
         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")
-- 
1.9.1




More information about the bitbake-devel mailing list