diff options
-rwxr-xr-x | bin/reproducible_common.py | 7 | ||||
-rwxr-xr-x | bin/reproducible_html_indexes.py | 4 | ||||
-rwxr-xr-x | bin/reproducible_html_notes.py | 2 | ||||
-rwxr-xr-x | bin/reproducible_html_packages.py | 4 |
4 files changed, 7 insertions, 10 deletions
diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py index f3251553..f621beaa 100755 --- a/bin/reproducible_common.py +++ b/bin/reproducible_common.py @@ -426,7 +426,7 @@ def link_packages(packages, suite, arch): return html -def join_status_icon(status, package=None, version=None): +def get_status_icon(status): table = {'reproducible' : 'weather-clear.png', 'FTBFS': 'weather-storm.png', 'FTBR' : 'weather-showers-scattered.png', @@ -440,13 +440,10 @@ def join_status_icon(status, package=None, version=None): status = 'FTBR' elif status == 'not for us': status = 'not_for_us' - log.debug('Linking status ⇔ icon. package: ' + str(package) + ' @ ' + - str(version) + ' status: ' + status) try: return (status, table[status]) except KeyError: - log.error('Status of package ' + package + ' (' + status + - ') not recognized') + log.error('Status ' + status + ' not recognized') return (status, '') def strip_epoch(version): diff --git a/bin/reproducible_html_indexes.py b/bin/reproducible_html_indexes.py index c8d1689b..cbd18897 100755 --- a/bin/reproducible_html_indexes.py +++ b/bin/reproducible_html_indexes.py @@ -24,7 +24,7 @@ Reference doc for the folowing lists: the string above + `body`: a list of dicts containing every section that made up the page. Every section has: - - `icon_status`: the name of a icon (see join_status_icon()) + - `icon_status`: the name of a icon (see get_status_icon()) - `icon_link`: a link to hide below the icon - `query`: query to perform against the reproducible db to get the list of packages to show @@ -423,7 +423,7 @@ def build_leading_text_section(section, rows, suite, arch): no_icon_link = True # to avoid closing the </a> tag below if section.get('icon_status'): html += '<img src="/static/' - html += join_status_icon(section['icon_status'])[1] + html += get_status_icon(section['icon_status'])[1] html += '" alt="reproducible icon" />' if not no_icon_link: html += '</a>' diff --git a/bin/reproducible_html_notes.py b/bin/reproducible_html_notes.py index 1e9b02e8..ad55d0a7 100755 --- a/bin/reproducible_html_notes.py +++ b/bin/reproducible_html_notes.py @@ -276,7 +276,7 @@ def gen_html_issue(issue, suite): if not pkgs: continue affected += tab*4 + '<p>\n' - affected += tab*5 + '<img src="/static/' + join_status_icon(status)[1] + '"' + affected += tab*5 + '<img src="/static/' + get_status_icon(status)[1] + '"' affected += ' alt="' + status + ' icon" />\n' affected += tab*5 + str(len(pkgs)) + ' ' + status + ' packages in ' + suite + '/' + arch +':\n' affected += tab*5 + '<code>\n' diff --git a/bin/reproducible_html_packages.py b/bin/reproducible_html_packages.py index a693227b..a5875b75 100755 --- a/bin/reproducible_html_packages.py +++ b/bin/reproducible_html_packages.py @@ -199,7 +199,7 @@ def gen_suites_links(package, current_suite, current_arch): prefix = '' suffix = '\n' icon = prefix + '<img src="/static/{icon}" alt="{status}" title="{status}"/>' + suffix - html += icon.format(icon=join_status_icon(status)[1], status=status) + html += icon.format(icon=get_status_icon(status)[1], status=status) html += (tab*2 + ' <a href="{}/{}/{}/{}.html" target="_parent"' + \ ' title="{}: {}{}">{}</a> in <a href="/{}/{}/" target="_parent">{}</a>\n').format(RB_PKG_URI, s, a, package.name, status, version, build_date, version, s, a, s) @@ -238,7 +238,7 @@ def gen_packages_html(packages, no_clean=False): links, default_view = gen_extra_links( pkg, version, suite, arch, status) suites_links = gen_suites_links(package, suite, arch) - status, icon = join_status_icon(status, pkg, version) + status, icon = get_status_icon(status) status = gen_status_link_icon(status, icon, suite, arch) html = html_package_page.substitute( |