Commit 8629a543 authored by Iustin Pop's avatar Iustin Pop
Browse files

burnin: fix removal errors hiding real errors



A long-standing bug in burnin makes errors during the removal phase
(e.g. because an import has failed, or because the initial creation has
failed) hide the original error.

This patch suppresses removal errors if we are already in ‘has_err’
mode, and otherwise it displays them normally.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 360b0dc2
......@@ -784,7 +784,14 @@ class Burner(object):
Log(self.GetFeedbackBuf())
Log("\n\n")
if not self.opts.keep_instances:
self.BurnRemove()
try:
self.BurnRemove()
except Exception, err:
if has_err: # already detected errors, so errors in removal
# are quite expected
Log("Note: error detected during instance remove: %s" % str(err))
else: # non-expected error
raise
return 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment