From 7d41664cb8debacdc4d84196a1f021c4bcce07a2 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Tue, 17 May 2016 14:17:12 +0200 Subject: reproducible debian: remove '.debian.net' from nodenames on package test history pages --- bin/reproducible_html_packages.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bin') 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 += '\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 += '{}'.format(i) html += '\n{tab}'.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 = '{spokenstatus} ' + spokenstatus -- cgit v1.2.3-70-g09d2