[Buildbot-commits] buildbot/buildbot/status html.py,1.74,1.75 mail.py,1.21,1.22

Brian Warner warner at users.sourceforge.net
Wed Oct 26 21:33:22 UTC 2005


Update of /cvsroot/buildbot/buildbot/buildbot/status
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5367/buildbot/status

Modified Files:
	html.py mail.py 
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-402
Creator:  Brian Warner <warner at lothar.com>

apply mail/html patches from Dobes Vandermeer and Frerich Raabe

	* buildbot/status/mail.py (MailNotifier): urllib.escape the URLs
	in case they have spaces or whatnot. Patch from Dobes Vandermeer.
	* buildbot/test/test_status.py (MyStatus.getURLForThing): fix it

	* buildbot/status/html.py (td): put a single non-breaking space
	inside otherwise empty <td> elements, as a workaround for buggy
	browsers which would optimize them away (along with any associated
	styles, like the kind that create the waterfall grid borders).
	Patch from Frerich Raabe.


Index: html.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/html.py,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- html.py	23 Oct 2005 05:48:17 -0000	1.74
+++ html.py	26 Oct 2005 21:33:20 -0000	1.75
@@ -82,6 +82,8 @@
         if p != None:
             data += " %s=\"%s\"" % (prop, p)
     data += ">"
+    if not text:
+        text = " "
     if type(text) == types.ListType:
         data += string.join(text, "<br />")
     else:

Index: mail.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/mail.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- mail.py	20 Oct 2005 22:32:48 -0000	1.21
+++ mail.py	26 Oct 2005 21:33:20 -0000	1.22
@@ -10,6 +10,7 @@
     canDoAttachments = True
 except ImportError:
     canDoAttachments = False
+import urllib
 
 from twisted.internet import defer
 from twisted.application import service
@@ -232,12 +233,13 @@
             text += "The Buildbot has detected a new failure of %s.\n" % name
         buildurl = self.status.getURLForThing(build)
         if buildurl:
-            text += "Full details are available at:\n %s\n" % buildurl
+            text += ("Full details are available at:\n %s\n" %
+                     urllib.quote(buildurl, '/:'))
         text += "\n"
 
         url = self.status.getBuildbotURL()
         if url:
-            text += "Buildbot URL: %s\n\n" % url
+            text += "Buildbot URL: %s\n\n" % urllib.quote(url, '/:')
 
         text += "Build Reason: %s\n" % build.getReason()
 





More information about the Commits mailing list