From 4e514e56a317d099acbc2dcb4a57561ee5df3fb6 Mon Sep 17 00:00:00 2001 From: Luca Falavigna Date: Sun, 10 Oct 2010 19:10:38 +0000 Subject: [PATCH] examine-package: colorize distribution Assign a color to Distribution field if it's not unstable or experimental, to ease detection of those packages uploaded to an uncommon distribution. Signed-off-by: Luca Falavigna --- dak/examine_package.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dak/examine_package.py b/dak/examine_package.py index fc0dfba8..5b247f0c 100755 --- a/dak/examine_package.py +++ b/dak/examine_package.py @@ -114,7 +114,8 @@ ansi_colours = { 'arch': "\033[32m", 'end': "\033[0m", 'bold': "\033[1m", - 'maintainer': "\033[32m"} + 'maintainer': "\033[32m", + 'distro': "\033[1m\033[41m"} html_colours = { 'main': ('',""), @@ -122,7 +123,8 @@ html_colours = { 'nonfree': ('',""), 'arch': ('',""), 'bold': ('',""), - 'maintainer': ('',"")} + 'maintainer': ('',""), + 'distro': ('',"")} def colour_output(s, colour): if use_html: @@ -298,6 +300,9 @@ def read_changes_or_dsc (suite, filename, session = None): elif k == "architecture": if (dsc["architecture"] != "any"): dsc['architecture'] = colour_output(dsc["architecture"], 'arch') + elif k == "distribution": + if dsc["distribution"] not in ('unstable', 'experimental'): + dsc['distribution'] = colour_output(dsc["distribution"], 'distro') elif k in ("files","changes","description"): if use_html: dsc[k] = formatted_text(dsc[k], strip=True) -- 2.39.5