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

Debian Pure Blends Subversion Commit noreply at alioth.debian.org
Tue Oct 13 13:24:37 UTC 2009


Author: tille
Date: Tue Oct 13 13:24:36 2009
New Revision: 1930
URL: http://svn.debian.org/viewsvn/blends?rev=1930&view=rev

Log:
Throw warnings if there is something wrong with the upload history


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=1930&view=diff&r1=1930&r2=1929&p1=blends/trunk/webtools/blendstasktools.py&p2=blends/trunk/webtools/blendstasktools.py
==============================================================================
--- blends/trunk/webtools/blendstasktools.py	(original)
+++ blends/trunk/webtools/blendstasktools.py	Tue Oct 13 13:24:36 2009
@@ -723,11 +723,16 @@
 
             query = "EXECUTE query_get_latest_uploader ('%s')" % (self.src)
             curs.execute(query)
-            changed = unicode(curs.fetchone()[0], 'utf-8')
-            if not changed.startswith(self.properties['maintainer']):
-                (_name, _url) = email.Utils.parseaddr(changed)
-                changed = '<a href="mailto:%s">%s</a>' % (_url, _name)
-                self.properties['changed_by'] = MarkupString(changed, self.pkg, 'changed_by')
+            try:
+                changed = unicode(curs.fetchone()[0], 'utf-8')
+	    except TypeError, err:
+                changed = None
+                print "Query '%s' does not result in a valid changed entry (%s)" % (query, err)
+            if changed:
+                if not changed.startswith(self.properties['maintainer']):
+                    (_name, _url) = email.Utils.parseaddr(changed)
+                    changed = '<a href="mailto:%s">%s</a>' % (_url, _name)
+                    self.properties['changed_by'] = MarkupString(changed, self.pkg, 'changed_by')
 
         query = "EXECUTE query_check_enhances ('%"+self.pkg+"%')"
         curs.execute(query)



More information about the Blends-commit mailing list