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

Debian Pure Blends Subversion Commit noreply at alioth.debian.org
Thu Sep 30 11:59:22 UTC 2010


Author: tille
Date: Thu Sep 30 11:59:21 2010
New Revision: 2379
URL: http://svn.debian.org/viewsvn/blends?rev=2379&view=rev

Log:
More debugging code in new_upstream in case of unicode problems, better formatting of last uploader


Modified:
   blends/trunk/webtools/blendstasktools.py
   blends/trunk/webtools/new_upstream.py

Modified: blends/trunk/webtools/blendstasktools.py
URL: http://svn.debian.org/viewsvn/blends/blends/trunk/webtools/blendstasktools.py?rev=2379&view=diff&r1=2379&r2=2378&p1=blends/trunk/webtools/blendstasktools.py&p2=blends/trunk/webtools/blendstasktools.py
==============================================================================
--- blends/trunk/webtools/blendstasktools.py	(original)
+++ blends/trunk/webtools/blendstasktools.py	Thu Sep 30 11:59:21 2010
@@ -739,6 +739,7 @@
                 changed = '<a href="mailto:%s">%s</a>' % (_url, _name)
                 self.properties['changed_by']    = MarkupString(changed, self.pkg, 'changed_by')
                 self.properties['last_uploader'] = to_unicode(changed)
+                self.properties['last_uploader_simple'] = to_unicode('%s <%s>' % (_name, _url))
 
         if source == 0: # If we are querying for source packages to render BTS pages
                 # tranlations are irrelevant - so only obtain ddtp translations
@@ -901,8 +902,8 @@
             for dep in use_dependencystatus:
                 for tdep in tdeps.dependencies[dep]:
             	    if tdep.outdated != {}:
-                        if tdep.properties.has_key('last_uploader'):
-                            last_uploader = tdep.properties['last_uploader']
+                        if tdep.properties.has_key('last_uploader_simple'):
+                            last_uploader = tdep.properties['last_uploader_simple']
                         else:
                             last_uploader = None
             		# versions are ordered lists      ---v--- last one is needed

Modified: blends/trunk/webtools/new_upstream.py
URL: http://svn.debian.org/viewsvn/blends/blends/trunk/webtools/new_upstream.py?rev=2379&view=diff&r1=2379&r2=2378&p1=blends/trunk/webtools/new_upstream.py&p2=blends/trunk/webtools/new_upstream.py
==============================================================================
--- blends/trunk/webtools/new_upstream.py	(original)
+++ blends/trunk/webtools/new_upstream.py	Thu Sep 30 11:59:21 2010
@@ -29,21 +29,21 @@
 		try:
 			print printstring
 		except UnicodeEncodeError, err:
+			print "\t%s: (Problem printing UTF-8 data)\n\t\tHighest version in Debian is %s\n\t\tUpstream has %s\n" % \
+			    ( pkg_v_o[0][0], pkg_v_o[0][1], pkg_v_o[0][2] )
 			try:
-				print "\t%s: Problem printing data\n\t\tHighest version in Debian is %s\n\t\tUpstream has %s\n" % \
-				    ( pkg_v_o[0][0], pkg_v_o[0][1], pkg_v_o[0][2] )
+				print "type(pkg_v_o[0][3]) =", type(pkg_v_o[0][3])
+				print "type(pkg_v_o[1]) =", type(pkg_v_o[1])
 				# maintainerfield of package gnudatalanguage which is
 				#   Gürkan Sengün <gurkan at phys.ethz.ch>
 				# breaks print for some reason I do not understand because everything should be UTF-8
 				# error is: 'ascii' codec can't encode character u'\xfc' in position 104: ordinal not in range(128)
 				# just stick to the e-mail address to do something useful ...
-				print_wo_maintainer = re.sub('^(.+Maintainer is ).+(<.+ at .+>.*)', '\\1\\2', printstring)
-				if print_wo_maintainer.startswith(printstring):
-					print "Replacement for maintainer in %s failed!" % pkg_v_o[0][0]
-				else:
-					print "\t%s:\n\t\tHighest version in Debian is %s\n\t\tUpstream has %s\n\t\tMaintainer is ..." %\
-					    ( pkg_v_o[0][0], pkg_v_o[0][1], pkg_v_o[0][2] )
-					print print_wo_maintainer[0:80]
+				print_wo_maintainer = pkg_v_o[0][3][0] # re.sub('^.+(<.+ at .+>.*)', '\\1', pkg_v_o[0][3])
+				print "\t\tMaintainer is ... %s" % ( print_wo_maintainer )
+				# print print_wo_maintainer[0:80]
+				if pkg_v_o[1]:
+					printstring = printstring + "\n\t\tLast uploader was " + pkg_v_o[1]
 			except:
 				pass
 



More information about the Blends-commit mailing list