[pypy-commit] buildbot default: Try to make the "name" mandatory when we use the "force build" button.

arigo noreply at buildbot.pypy.org
Wed Jun 8 16:52:17 CEST 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r515:266b2b007f64
Date: 2011-06-08 16:53 +0200
http://bitbucket.org/pypy/buildbot/changeset/266b2b007f64/

Log:	Try to make the "name" mandatory when we use the "force build"
	button.

diff --git a/bot2/pypybuildbot/master.py b/bot2/pypybuildbot/master.py
--- a/bot2/pypybuildbot/master.py
+++ b/bot2/pypybuildbot/master.py
@@ -32,6 +32,16 @@
     StatusResourceBuilder.ping = my_ping
 # Disabled.
 
+# Forbid "force build" with empty user name
+def my_force(self, req):
+    name = req.args.get("username", [""])[0]
+    assert name, "Please write your name in the corresponding field."
+    return _previous_force(self, req)
+_previous_force = StatusResourceBuilder.force
+if _previous_force.__name__ == 'force':
+    StatusResourceBuilder.force = my_force
+# Done
+
 # Add a link from the builder page to the summary page
 def my_body(self, req):
     data = _previous_body(self, req)


More information about the pypy-commit mailing list