Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(922)

Unified Diff: third_party/buildbot_8_4p1/buildbot/status/words.py

Issue 1440163005: Allow users to customize the sanity-checking regexes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/buildbot_8_4p1/buildbot/status/web/builder.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/buildbot_8_4p1/buildbot/status/words.py
diff --git a/third_party/buildbot_8_4p1/buildbot/status/words.py b/third_party/buildbot_8_4p1/buildbot/status/words.py
index 492ecd56ab456e78ab7bd54c96705def424fd3f1..d7a54506e46ae09e2a80f8b6ae3daa6d189f677e 100644
--- a/third_party/buildbot_8_4p1/buildbot/status/words.py
+++ b/third_party/buildbot_8_4p1/buildbot/status/words.py
@@ -89,6 +89,7 @@ class Contact(base.StatusReceiver):
def __init__(self, channel):
#StatusReceiver.__init__(self) doesn't exist
self.channel = channel
+ self.master = channel.master
self.notify_events = {}
self.subscribed = 0
self.muted = False
@@ -451,12 +452,13 @@ class Contact(base.StatusReceiver):
raise UsageError("you must provide a Builder, " + errReply)
# keep weird stuff out of the branch and revision strings.
- # TODO: centralize this somewhere.
- if branch and not re.match(r'^[\w\.\-\/]*$', branch):
+ branch_validate = self.master.config.validation['branch']
+ revision_validate = self.master.config.validation['revision']
+ if branch and not branch_validate.match(branch):
log.msg("bad branch '%s'" % branch)
self.send("sorry, bad branch '%s'" % branch)
return
- if revision and not re.match(r'^[\w\.\-\/]*$', revision):
+ if revision and not revision_validate.match(revision):
log.msg("bad revision '%s'" % revision)
self.send("sorry, bad revision '%s'" % revision)
return
« no previous file with comments | « third_party/buildbot_8_4p1/buildbot/status/web/builder.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698