Skip to content

Commit

Permalink
Capture and log errors during cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Jc2k authored and djmitche committed Apr 22, 2012
1 parent b003e14 commit aed46b6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions master/buildbot/process/builder.py
Expand Up @@ -262,9 +262,12 @@ def _startBuildFor(self, slavebuilder, buildrequests):
# into a list so that, at any point, we can abort this operation.
cleanups = []
def run_cleanups():
while cleanups:
fn = cleanups.pop()
fn()
try:
while cleanups:
fn = cleanups.pop()
fn()
except:
log.err(failure.Failure(), "while running %r" % (run_cleanups,))

# the last cleanup we want to perform is to update the big
# status based on any other cleanup
Expand Down

0 comments on commit aed46b6

Please sign in to comment.