Commit ddfde77e authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

burnin: Reuse existing function for debug value

Instead of using its own, burnin can use cli.SetGenericOpcodeOpts.
Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarRené Nussbaumer <>
parent 8f44674f
......@@ -320,11 +320,6 @@ class Burner(object):
msg, MAX_RETRIES - retry_count + 1, MAX_RETRIES, err)
self.MaybeRetry(retry_count - 1, msg, fn, *args)
def _SetDebug(self, ops):
"""Set the debug value on the given opcodes"""
for op in ops:
op.debug_level = self.opts.debug
def _ExecOp(self, *ops):
"""Execute one or more opcodes and manage the exec buffer.
......@@ -350,13 +345,13 @@ class Burner(object):
rval = 0
cli.SetGenericOpcodeOpts(ops, self.opts)
return self.MaybeRetry(rval, "opcode", self._ExecOp, *ops)
def ExecOrQueue(self, name, ops, post_process=None):
"""Execute an opcode and manage the exec buffer."""
if self.opts.parallel:
cli.SetGenericOpcodeOpts(ops, self.opts)
self.queued_ops.append((ops, name, post_process))
val = self.ExecOp(self.queue_retry, *ops) # pylint: disable-msg=W0142
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