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

Andreas Tille tille at debian.org
Thu Aug 1 21:38:40 UTC 2013


The following commit has been merged in the master branch:
commit aac69d51316ac82b1e4e30f782744293ae4a6493
Author: Andreas Tille <tille at debian.org>
Date:   Thu Aug 1 22:27:57 2013 +0200

    drop unused code, add debug code to track down unicode problems

diff --git a/webtools/bugs_udd.py b/webtools/bugs_udd.py
index 3edd276..57250e4 100755
--- a/webtools/bugs_udd.py
+++ b/webtools/bugs_udd.py
@@ -203,7 +203,7 @@ def main():
                 sources['source']      = pkg['source']
                 sources['homepage']    = pkg['homepage']
                 sources['vcs_browser'] = pkg['vcs_browser']
-                sources['maintainer']  = pkg['maintainer']
+                sources['maintainer']  = to_unicode(pkg['maintainer'])
                 if pkg['status'] == 'depends':
                     sources['bugs'] = bugs[pkg['source']]['open']
                     bugs_data[task][pkg['status']+'_l'].append(pkg['source'])
@@ -349,41 +349,6 @@ the right shows the tasks of %s.""" ) \
     weightedsev     = {} # verbal interpretation of weighted bugs
     weightedclass   = {} # CSS class according bug weight
     weighttask      = {} # weighted severity as number per task
-    # severitystat    = {} # Count bugs with different severities per task
-    for task in (): ## FIXME:  bugs_data:
-    	pkgbugs       = []
-    	nbugs[task]   = 0
-    	ndone[task]   = 0
-    	buglist[task] = {}
-    
-    	# query bugs of meta package name
-    	pkg = { 'pkgname'    : data['tasks'][task].metapkg.pkg,
-    		'source'     : None,
-    		'homepage'   : None,
-    		'vcs-browser': None,
-    		'maintainer' : None,
-    	      }
-    	if data['tasks'][task].metapkg.properties['vcs-browser'] != HOMEPAGENONE:
-    		pkg['vcs-browser'] = data['tasks'][task].metapkg.properties['vcs-browser']
-    	if data['tasks'][task].metapkg.responsible != None:
-    		pkg['maintainer']  = data['tasks'][task].metapkg.responsible
-    	pkgbug_oad = PackageBugsOpenAndDone(pkg)
-    	# the metapackage itself belongs to the list do dependent packages
-    	if pkgbug_oad.open.pkgname:
-    		buglist[task][DEPENDENT].append(pkgbug_oad.open)
-    		nbugs[task] += pkgbug_oad.open.nbugs
-    	if pkgbug_oad.done.pkgname:
-    		buglist[task][DONE].append(pkgbug_oad.done)
-    		ndone[task] += pkgbug_oad.done.nbugs
-    
-    	for pkg in packages[task]:
-    		pkgbug_oad = PackageBugsOpenAndDone(pkg)
-    		if pkgbug_oad.open.pkgname:
-    			buglist[task][pkg['bugrelevantdependency']].append(pkgbug_oad.open)
-    		if pkgbug_oad.done.pkgname:
-    			buglist[task][DONE].append(pkgbug_oad.done)
-    		nbugs[task] += pkgbug_oad.open.nbugs
-    		ndone[task] += pkgbug_oad.done.nbugs
     
     wsev = 0  # sumarise weighted severities
     for task in bugs_data:
@@ -456,7 +421,13 @@ the right shows the tasks of %s.""" ) \
     
     	template = loader.load('bugs_udd.xhtml')
     	f = open(outputdir + '/' + task + '.html', 'w')
-    	print >> f, template.generate(**data).render('xhtml')
+    	try:
+            print >> f, template.generate(**data).render('xhtml')
+        except UnicodeDecodeError, err:
+            fd = open('debug_'+blendname+'_bugs.json', 'w')
+            print >>fd, json.dumps(bugs_data[task])
+            fd.close()
+            print err
     
     	f.close()
     

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list