Permalink
Browse files

Exit with error code 1 if sendchange fails.

Fixes: #838
  • Loading branch information...
1 parent ccbd4c8 commit 924673ec6f2644300bcdda3bc5127be0e2171121 @catlee catlee committed Aug 25, 2010
Showing with 8 additions and 2 deletions.
  1. +8 −2 master/buildbot/scripts/runner.py
@@ -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
@@ -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":

0 comments on commit 924673e

Please sign in to comment.