Ticket #226: nofailRestart.diff
| File nofailRestart.diff, 1.8 kB (added by bhearsum, 8 months ago) |
|---|
-
old-upstream-buildbot-mirror/buildbot/interfaces.py
old new 14 14 class BuildSlaveTooOldError(Exception): 15 15 pass 16 16 17 # other exceptions 18 class BuildbotNotRunningError(Exception): 19 pass 20 17 21 class IChangeSource(Interface): 18 22 """Object which feeds Change objects to the changemaster. When files or 19 23 directories are changed and the version control system provides some -
old-upstream-buildbot-mirror/buildbot/scripts/runner.py
old new 6 6 import traceback 7 7 from twisted.python import usage, util, runtime 8 8 9 from buildbot.interfaces import BuildbotNotRunningError 10 9 11 # this is mostly just a front-end for mktap, twistd, and kill(1), but in the 10 12 # future it will also provide an interface to some developer tools that talk 11 13 # directly to a remote buildmaster (like 'try' and a status client) … … 457 459 basedir = config['basedir'] 458 460 quiet = config['quiet'] 459 461 os.chdir(basedir) 460 f = open("twistd.pid", "rt") 462 try: 463 f = open("twistd.pid", "rt") 464 except: 465 raise BuildbotNotRunningError 461 466 pid = int(f.read().strip()) 462 467 signum = getattr(signal, "SIG"+signame) 463 468 timer = 0 … … 483 488 def restart(config): 484 489 quiet = config['quiet'] 485 490 from buildbot.scripts.startup import start 486 stop(config, wait=True) 491 try: 492 stop(config, wait=True) 493 except BuildbotNotRunningError: 494 pass 487 495 if not quiet: 488 496 print "now restarting buildbot process.." 489 497 start(config)
![[Buildbot Logo]](/trac/chrome/site/header-text-transparent.png)