]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: models fall back to a sensible string for no vcs reference
authorMichael Wood <michael.g.wood@intel.com>
Fri, 23 Oct 2015 21:57:18 +0000 (22:57 +0100)
committerMichael Wood <michael.g.wood@intel.com>
Mon, 8 Feb 2016 17:30:15 +0000 (17:30 +0000)
Fall back to a 'n/a' string for the vcs reference, not all our source
has to be in a vcs and therefore it is legitimate for this to be none.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
lib/toaster/orm/models.py

index ac2aa9e469b31340db96b659a7588b578953e202..9c573bf003cf713c11e5aa8883e6d2b6833874c8 100644 (file)
@@ -1326,7 +1326,7 @@ class Layer_Version(models.Model):
             return self.up_branch.name
         if self.commit is not None and len(self.commit) > 0:
             return self.commit
-        return ("Cannot determine the vcs_reference for layer version %s" % vars(self))
+        return 'N/A'
 
     def get_detailspage_url(self, project_id):
         return reverse('layerdetails', args=(project_id, self.pk))