summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_html_packages.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/reproducible_html_packages.py b/bin/reproducible_html_packages.py
index ed58b055..ce01db6d 100755
--- a/bin/reproducible_html_packages.py
+++ b/bin/reproducible_html_packages.py
@@ -197,6 +197,10 @@ def gen_suites_links(package, current_suite, current_arch):
html += '</ul>\n'
return tab*5 + (tab*7).join(html.splitlines(True))
+def shorten_if_debiannet(hostname):
+ if hostname[-11:] == '.debian.net':
+ hostname = hostname[:-11]
+ return hostname
def gen_history_page(package):
keys = ('build date', 'version', 'suite', 'architecture', 'result',
@@ -211,6 +215,9 @@ def gen_history_page(package):
html += '<th>{}</th>'.format(i)
html += '\n{tab}</tr>'.format(tab=tab)
for record in package.history:
+ # remove trailing .debian.net from hostnames
+ record['node1'] = shorten_if_debiannet(record['node1'])
+ record['node2'] = shorten_if_debiannet(record['node2'])
# add icon to result
status, icon, spokenstatus = get_status_icon(record['result'])
result_html = '<img src="/static/{icon}" alt="{spokenstatus}" title="{spokenstatus}"/> ' + spokenstatus