]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: do not throw exception on misconfigured data
authorAlexandru DAMIAN <alexandru.damian@intel.com>
Mon, 16 Mar 2015 12:19:56 +0000 (12:19 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 21 Mar 2015 00:00:01 +0000 (00:00 +0000)
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@intel.com>
lib/toaster/orm/models.py

index eea98b5e7100138b4f3d68b81128bb7bdefd2c99..625eb1ee85b7fc7c7457cfb38eb1e26f0bcb7e0f 100644 (file)
@@ -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")