diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-01-20 00:33:56 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-02-15 17:37:46 +0100 |
commit | 34db77462dc90fb5fe37097435d42b18341a59e6 (patch) | |
tree | 53184b26a18538fc49ab1c2357c86100fc6f98d8 /bin/reproducible_common.py | |
parent | 1c62756f56f921f60485ccfee357ecc4b222fa8b (diff) | |
download | jenkins.debian.net-34db77462dc90fb5fe37097435d42b18341a59e6.tar.xz |
reproducible: move get_trailing_icon() from _html_notes to common
Diffstat (limited to 'bin/reproducible_common.py')
-rwxr-xr-x | bin/reproducible_common.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py index 7969d593..d26574ad 100755 --- a/bin/reproducible_common.py +++ b/bin/reproducible_common.py @@ -373,6 +373,22 @@ def get_bugs(): log.error('item: ' + str(bug)) return packages +def get_trailing_icon(package, bugs): + html = '' + if package in bugs: + for bug in bugs[package]: + html += '<span class="' + if bugs[package][bug]['done']: + html += 'bug-done" title="#' + str(bug) + ', done">#</span>' + elif bugs[package][bug]['patch']: + html += 'bug-patch" title="#' + str(bug) + ', with patch">+</span>' + else: + html += '" title="#' + str(bug) + '">+</span>' + if html: + print(html) + return html + + # init the databases connections conn_db = start_db_connection() # the local sqlite3 reproducible db conn_udd = start_udd_connection() |