pipeline: delay cleanup of build tree
Delay the cleanup of the build tree of the build pipeline, and first check the result and only cleanup the tree when the build did not fail, because in that case both returned trees will be None and trying to cleanup them up will result in an exception. Therefore, also don't clean up `tree` in the error case.
This commit is contained in:
parent
67dfe0965e
commit
08fc223276
1 changed files with 4 additions and 4 deletions
|
|
@ -232,16 +232,16 @@ class Pipeline:
|
|||
interactive,
|
||||
libdir,
|
||||
secrets)
|
||||
# Cleanup the build tree used to build `tree`
|
||||
# which is not needed anymore
|
||||
t.cleanup()
|
||||
|
||||
results["build"] = r
|
||||
if not r["success"]:
|
||||
tree.cleanup()
|
||||
results["success"] = False
|
||||
return results, None, None
|
||||
|
||||
# Cleanup the build tree (`t`) which was used to
|
||||
# build `tree`; it is now not needed anymore
|
||||
t.cleanup()
|
||||
|
||||
build_tree = tree
|
||||
|
||||
# Create a new tree. The base is our tree_id because if that
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue