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

Unified Diff: third_party/buildbot_7_12/buildbot/scripts/reconfig.py

Issue 12207158: Bye bye buildbot 0.7.12. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 10 months 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
Index: third_party/buildbot_7_12/buildbot/scripts/reconfig.py
diff --git a/third_party/buildbot_7_12/buildbot/scripts/reconfig.py b/third_party/buildbot_7_12/buildbot/scripts/reconfig.py
deleted file mode 100644
index 104214b51651820f40492a46eee603013b415d94..0000000000000000000000000000000000000000
--- a/third_party/buildbot_7_12/buildbot/scripts/reconfig.py
+++ /dev/null
@@ -1,69 +0,0 @@
-
-import os, signal, platform
-from twisted.internet import reactor
-
-from buildbot.scripts.logwatcher import LogWatcher, BuildmasterTimeoutError, \
- ReconfigError
-
-class Reconfigurator:
- def run(self, config):
- # Returns "Microsoft" for Vista and "Windows" for other versions
- if platform.system() in ("Windows", "Microsoft"):
- print "Reconfig (through SIGHUP) is not supported on Windows."
- print "The 'buildbot debugclient' tool can trigger a reconfig"
- print "remotely, but requires Gtk+ libraries to run."
- return
-
- basedir = config['basedir']
- quiet = config['quiet']
- os.chdir(basedir)
- f = open("twistd.pid", "rt")
- self.pid = int(f.read().strip())
- if quiet:
- os.kill(self.pid, signal.SIGHUP)
- return
-
- # keep reading twistd.log. Display all messages between "loading
- # configuration from ..." and "configuration update complete" or
- # "I will keep using the previous config file instead.", or until
- # 10 seconds have elapsed.
-
- self.sent_signal = False
- lw = LogWatcher("twistd.log")
- d = lw.start()
- d.addCallbacks(self.success, self.failure)
- reactor.callLater(0.2, self.sighup)
- reactor.run()
-
- def sighup(self):
- if self.sent_signal:
- return
- print "sending SIGHUP to process %d" % self.pid
- self.sent_signal = True
- os.kill(self.pid, signal.SIGHUP)
-
- def success(self, res):
- print """
-Reconfiguration appears to have completed successfully.
-"""
- reactor.stop()
-
- def failure(self, why):
- if why.check(BuildmasterTimeoutError):
- print "Never saw reconfiguration finish."
- elif why.check(ReconfigError):
- print """
-Reconfiguration failed. Please inspect the master.cfg file for errors,
-correct them, then try 'buildbot reconfig' again.
-"""
- elif why.check(IOError):
- # we were probably unable to open the file in the first place
- self.sighup()
- else:
- print "Error while following twistd.log: %s" % why
- reactor.stop()
-
-def reconfig(config):
- r = Reconfigurator()
- r.run(config)
-
« no previous file with comments | « third_party/buildbot_7_12/buildbot/scripts/logwatcher.py ('k') | third_party/buildbot_7_12/buildbot/scripts/runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698