[Blends-commit] [SCM] website branch, master, updated. 6e3fb02be3a448c2a6aa15c0946d3ac5971272d2

Andreas Tille tille at debian.org
Thu Jul 18 06:45:20 UTC 2013


The following commit has been merged in the master branch:
commit 6e3fb02be3a448c2a6aa15c0946d3ac5971272d2
Author: Andreas Tille <tille at debian.org>
Date:   Thu Jul 18 08:48:36 2013 +0200

    Calculate severities summary

diff --git a/webtools/bugs_udd.py b/webtools/bugs_udd.py
index c1b1955..80898a3 100755
--- a/webtools/bugs_udd.py
+++ b/webtools/bugs_udd.py
@@ -157,9 +157,11 @@ def main():
     if curs.rowcount > 0:
         for pkg in RowDictionaries(curs):
             for task in pkg['tasks']:
-                bugs_data[task]['severities'] = {}
+                bugs_data[task]['depends']['severities'] = {}
+                bugs_data[task]['suggests']['severities'] = {}
                 for s in SEVERITIES:
-                    bugs_data[task]['severities'][s] = 0
+                    bugs_data[task]['depends']['severities'][s] = 0
+                    bugs_data[task]['suggests']['severities'][s] = 0
                 bugs_data[task]['nopenbugs'] = 0
                 bugs_data[task]['ndonebugs'] = 0
 		if not bugs_data[task][pkg['status']].has_key(pkg['source']):
@@ -170,9 +172,13 @@ def main():
                 if pkg['status'] == 'depends':
                     bugs_data[task][pkg['status']][pkg['source']]['bugs']    = bugs[pkg['source']]['open']
                     bugs_data[task][pkg['status']+'_l'].append(pkg['source'])
+                    for s in SEVERITIES:
+                        bugs_data[task][pkg['status']]['severities'][s] += bugs[pkg['source']]['severities'][s]
                 elif pkg['status'] == 'suggests':
                     bugs_data[task][pkg['status']][pkg['source']]['bugs']    = bugs[pkg['source']]['open']
                     bugs_data[task][pkg['status']+'_l'].append(pkg['source'])
+                    for s in SEVERITIES:
+                        bugs_data[task][pkg['status']]['severities'][s] += bugs[pkg['source']]['severities'][s]
                 else:
                     print >>stderr, "%s: Wrong status %s in task %s for source %s" % (blendname, pkg['status'], task, pkg['source'])
                     exit(1)

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list