[Blends-commit] [SCM] website branch, master, updated. 68017e530f79096495adad8d356a0a343254aa3c
Andreas Tille
tille at debian.org
Sun Jul 21 07:13:05 UTC 2013
The following commit has been merged in the master branch:
commit 68017e530f79096495adad8d356a0a343254aa3c
Author: Andreas Tille <tille at debian.org>
Date: Sun Jul 21 09:08:50 2013 +0200
Calculated weightedclass
diff --git a/webtools/bugs_udd.py b/webtools/bugs_udd.py
index d83a8c0..a099c91 100755
--- a/webtools/bugs_udd.py
+++ b/webtools/bugs_udd.py
@@ -225,18 +225,6 @@ def main():
print >>stderr, "No information about buggy packages received for Blend", blendname
exit(1)
- # Debuging output in JSON file
- f = open(blendname+'_bugs.json', 'w')
- for task in bugs_data:
- print >>f, "*** %s ***" % task
- for status in STATES:
- if bugs_data[task].has_key(status):
- print >>f, status
- print >>f, json.dumps(bugs_data[task][status])
- print >>f
- print >>f, json.dumps(bugs_data)
- f.close()
-
# Define directories used
current_dir = os.path.dirname(__file__)
# locale_dir = os.path.join(current_dir, 'locale')
@@ -312,6 +300,23 @@ the right shows the tasks of %s.""" ) \
(BAD, 'bad')
]
+ for task in bugs_data:
+ if bugs_data[task]['weighttask'] < data['assessments'][0][0]:
+ bugs_data[task]['weightedsev'] = _('Metapackage is in excellent shape')
+ bugs_data[task]['weightedclass'] = data['assessments'][0][1]
+
+ # Debuging output in JSON file
+ f = open(blendname+'_bugs.json', 'w')
+ for task in bugs_data:
+ print >>f, "*** %s ***" % task
+ for status in STATES:
+ if bugs_data[task].has_key(status):
+ print >>f, status
+ print >>f, json.dumps(bugs_data[task][status])
+ print >>f
+ print >>f, json.dumps(bugs_data)
+ f.close()
+
nbugs = {}
ndone = {}
buglist = {}
diff --git a/webtools/templates/bugs_udd.xhtml b/webtools/templates/bugs_udd.xhtml
index f044c92..6168dd2 100644
--- a/webtools/templates/bugs_udd.xhtml
+++ b/webtools/templates/bugs_udd.xhtml
@@ -52,7 +52,7 @@
<div py:choose="t">
<span py:when="task"
class="curlink"><a href="${t}.html">${t.capitalize()}</a> ${bugs_data[t]['nopenbugs']} (${bugs_data[t]['weighttask']})</span>
- <span py:otherwise="" class="link ${weightedclass[t]}"><a href="${t}.html">${tasks[t].metapkg.PrintedName.capitalize()}</a> ${nbugs[t]} (${weighttask[t]})</span>
+ <span py:otherwise="" class="link ${bugs_data[t]['weightedclass']}"><a href="${t}.html">${t.capitalize()}</a> ${nbugs[t]} (${bugs_data[t]['weighttask']})</span>
</div>
</py:for>
</div>
--
Static and dynamic websites for Debian Pure Blends
More information about the Blends-commit
mailing list