Author: Armin Rigo <[email protected]>
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)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit