[Blends-commit] r1794 - blends/trunk/webtools

Debian Pure Blends Subversion Commit noreply at alioth.debian.org
Tue Aug 18 15:43:15 UTC 2009


Author: tille
Date: Tue Aug 18 15:43:15 2009
New Revision: 1794
URL: http://svn.debian.org/viewsvn/blends?rev=1794&view=rev

Log:
More robust against unexpected fields


Modified:
   blends/trunk/webtools/blendstasktools.py

Modified: blends/trunk/webtools/blendstasktools.py
URL: http://svn.debian.org/viewsvn/blends/blends/trunk/webtools/blendstasktools.py?rev=1794&view=diff&r1=1794&r2=1793&p1=blends/trunk/webtools/blendstasktools.py&p2=blends/trunk/webtools/blendstasktools.py
==============================================================================
--- blends/trunk/webtools/blendstasktools.py	(original)
+++ blends/trunk/webtools/blendstasktools.py	Tue Aug 18 15:43:15 2009
@@ -1051,6 +1051,11 @@
                     why = stanza['why']
                     continue
                 if key == 'Responsible':
+                    responsible = stanza['responsible'].strip()
+            	    if not dep:
+            		# Make sure there is really enough information to deal with provided by the package
+            		print >>stderr, "Missing package information for field %s = %s" % (key, responsible)
+            		continue
                     if dep.responsible != None:
                         # we are dealing with an official package that has a real maintainer who
                         # is finally responsible
@@ -1058,7 +1063,6 @@
                         # person makes sense in the tasks field
                         # fields_obsolete.append(key)
                         continue
-                    responsible = stanza['responsible'].strip()
                     if responsible != '':
                         (_name, _url) = email.Utils.parseaddr(responsible)
                         dep.responsible = '<a href="mailto:%s">%s</a>' % (_url, unicode(_name, 'utf-8'))



More information about the Blends-commit mailing list