diff --git a/britney2/excuse.py b/britney2/excuse.py index 36dd32d..5e36c6e 100644 --- a/britney2/excuse.py +++ b/britney2/excuse.py @@ -208,6 +208,21 @@ class Excuse(object): return VERDICT2DESC[verdict] return "UNKNOWN: Missing description for {0} - Please file a bug against Britney".format(verdict.name) + def _render_dep_issue(self, dep_issues, invalid_deps, field): + lastdep = "" + res = [] + for x in sorted(dep_issues, key=lambda x: x.split('/')[0]): + dep = x.split('/')[0] + if dep == lastdep: + continue + lastdep = dep + if x in invalid_deps: + res.append("
  • %s: %s %s (not considered)\n" % (field, self.name, dep, dep)) + else: + res.append("
  • %s: %s %s\n" % (field, self.name, dep, dep)) + + return "".join(res) + def html(self): """Render the excuse in HTML""" res = "%s (%s to %s)\n\n" return res