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

Andreas Tille tille at debian.org
Sat Jul 27 10:52:09 UTC 2013


The following commit has been merged in the master branch:
commit e6e85309ddb533a4157bb546e9e5ceea8ceddecf
Author: Andreas Tille <tille at debian.org>
Date:   Sat Jul 27 12:47:11 2013 +0200

    Introduce sources entry to bugs_data dict (Stadtgottesakker Halle)

diff --git a/webtools/bugs_udd.py b/webtools/bugs_udd.py
index 3c75c47..f0137de 100755
--- a/webtools/bugs_udd.py
+++ b/webtools/bugs_udd.py
@@ -149,8 +149,9 @@ def main():
             bugs_data[task]['ndonebugs'] = 0
             bugs_data[task]['weighttask'] = 0
             for status in STATES:
-                bugs_data[task][status + '_l']  = [] # enable sorting
-                bugs_data[task][status]         = {}
+                bugs_data[task][status + '_l']     = [] # enable sorting
+                bugs_data[task][status]            = {}
+                bugs_data[task][status]['sources'] = []
                 if status != 'done':
                     bugs_data[task][status]['severitysummary'] = '' # string listing number of bugs in different severity / dependency classes
                     bugs_data[task][status]['severities'] = {}
@@ -195,19 +196,19 @@ def main():
     if curs.rowcount > 0:
         for pkg in RowDictionaries(curs):
             for task in pkg['tasks']:
-		if not bugs_data[task][pkg['status']].has_key(pkg['source']):
-                    bugs_data[task][pkg['status']][pkg['source']] = {}
-                bugs_data[task][pkg['status']][pkg['source']]['homepage']    = pkg['homepage']
-                bugs_data[task][pkg['status']][pkg['source']]['vcs_browser'] = pkg['vcs_browser']
-                bugs_data[task][pkg['status']][pkg['source']]['maintainer']  = pkg['maintainer']
+                sources = {}
+                sources['source']      = pkg['source']
+                sources['homepage']    = pkg['homepage']
+                sources['vcs_browser'] = pkg['vcs_browser']
+                sources['maintainer']  = pkg['maintainer']
                 if pkg['status'] == 'depends':
-                    bugs_data[task][pkg['status']][pkg['source']]['bugs']    = bugs[pkg['source']]['open']
+                    sources['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]
                         bugs_data[task]['weighttask'] += 3 * WEIGHT[s] * bugs[pkg['source']]['severities'][s]
                 elif pkg['status'] == 'suggests':
-                    bugs_data[task][pkg['status']][pkg['source']]['bugs']    = bugs[pkg['source']]['open']
+                    sources['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]
@@ -215,13 +216,18 @@ def main():
                 else:
                     print >>stderr, "%s: Wrong status %s in task %s for source %s" % (blendname, pkg['status'], task, pkg['source'])
                     exit(1)
+                bugs_data[task][pkg['status']]['sources'].append(sources)
                 bugs_data[task]['nopenbugs'] += bugs[pkg['source']]['nopenbugs']
                 bugs_data[task]['ndonebugs'] += bugs[pkg['source']]['ndonebugs']
                 if bugs[pkg['source']]['done']:
-		    if not bugs_data[task]['done'].has_key(pkg['source']):
-                        bugs_data[task]['done'][pkg['source']] = {}
-                    bugs_data[task]['done'][pkg['source']]['bugs']           = bugs[pkg['source']]['done']
+                    sources = {}
+                    sources['source']      = pkg['source']
+                    sources['homepage']    = pkg['homepage']
+                    sources['vcs_browser'] = pkg['vcs_browser']
+                    sources['maintainer']  = pkg['maintainer']
+                    sources['bugs']        = bugs[pkg['source']]['done']
                     bugs_data[task]['done_l'].append(pkg['source'])
+                    bugs_data[task]['done']['sources'].append(sources)
     else:
         print >>stderr, "No information about buggy packages received for Blend", blendname
         exit(1)
@@ -380,7 +386,6 @@ the right shows the tasks of %s.""" ) \
     for task in bugs_data:
     	for status in STATES:
             if status != 'done':
-                bugs_data[task][status]['severitysummary'] = ''
                 komma  = ''
                 for s in SEVERITIES:
     		     if bugs_data[task][status]['severities'][s] != 0:
@@ -451,7 +456,6 @@ the right shows the tasks of %s.""" ) \
     	print >> f, template.generate(**data).render('xhtml')
     
     	f.close()
-	print "DEBUG: finished export", task
     
     template = loader.load('bugs_idx_udd.xhtml')
     outputfile = outputdir + '/index.html'

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list