X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fexamine_package.py;h=0e1b34ff23ee9b86802af1668c7d574b868e34a1;hb=0086ca02b521ce6bb625ac3cea14471763016798;hp=fc0dfba8bea6dd0e14c526b4ac5e797c94d22001;hpb=ac1d0cb4f02b4d7584e974013f2d1204b6f280ea;p=dak.git
diff --git a/dak/examine_package.py b/dak/examine_package.py
index fc0dfba8..0e1b34ff 100755
--- a/dak/examine_package.py
+++ b/dak/examine_package.py
@@ -42,6 +42,12 @@ to stdout. Those functions can be used in multithreaded parts of dak.
################################################################################
+# suppress some deprecation warnings in squeeze related to md5 module
+import warnings
+warnings.filterwarnings('ignore', \
+ "the md5 module is deprecated; use hashlib instead", \
+ DeprecationWarning)
+
import errno
import os
import re
@@ -114,7 +120,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 +129,8 @@ html_colours = {
'nonfree': ('',""),
'arch': ('',""),
'bold': ('',""),
- 'maintainer': ('',"")}
+ 'maintainer': ('',""),
+ 'distro': ('',"")}
def colour_output(s, colour):
if use_html:
@@ -298,6 +306,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)