Show links to Launchpad package pages in excuses

pre-rebase-2016-10-25
Colin Watson 12 years ago committed by Martin Pitt
parent 20945927de
commit afc2a1d7f8

@ -159,8 +159,20 @@ class Excuse(object):
def html(self): def html(self):
"""Render the excuse in HTML""" """Render the excuse in HTML"""
res = "<a id=\"%s\" name=\"%s\">%s</a> (%s to %s)\n<ul>\n" % \ lp_pkg = "https://launchpad.net/%s/+source/%s" % (self.distribution, self.name.split("/")[0])
(self.name, self.name, self.name, self.ver[0], self.ver[1]) if self.ver[0] == "-":
lp_old = self.ver[0]
else:
lp_old = "<a href=\"%s/%s\">%s</a>" % (
lp_pkg, self.ver[0], self.ver[0])
if self.ver[1] == "-":
lp_new = self.ver[1]
else:
lp_new = "<a href=\"%s/%s\">%s</a>" % (
lp_pkg, self.ver[1], self.ver[1])
res = (
"<a id=\"%s\" name=\"%s\" href=\"%s\">%s</a> (%s to %s)\n<ul>\n" %
(self.name, self.name, lp_pkg, self.name, lp_old, lp_new))
if self.maint: if self.maint:
res = res + "<li>Maintainer: %s\n" % (self.maint) res = res + "<li>Maintainer: %s\n" % (self.maint)
if self.section and self.section.find("/") > -1: if self.section and self.section.find("/") > -1:

Loading…
Cancel
Save