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>
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")