Skip to content

Commit

Permalink
Exit with error code 1 if sendchange fails.
Browse files Browse the repository at this point in the history
Fixes: #838
  • Loading branch information
Chris AtLee committed Aug 25, 2010
1 parent ccbd4c8 commit 924673e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions master/buildbot/scripts/runner.py
Expand Up @@ -841,9 +841,14 @@ def sendchange(config, runReactor=False):
d = s.send(branch, revision, comments, files, category=category, when=when,
properties=properties, repository=repository, project=project)
if runReactor:
d.addCallbacks(s.printSuccess, s.printFailure)
status = [True]
def failed(res):
status[0] = False
s.printFailure(res)
d.addCallbacks(s.printSuccess, failed)
d.addBoth(s.stop)
s.run()
return status[0]
return d


Expand Down Expand Up @@ -1120,7 +1125,8 @@ def run():
from buildbot.scripts.reconfig import Reconfigurator
Reconfigurator().run(so)
elif command == "sendchange":
sendchange(so, True)
if not sendchange(so, True):
sys.exit(1)
elif command == "debugclient":
debugclient(so)
elif command == "statuslog":
Expand Down

0 comments on commit 924673e

Please sign in to comment.