def execute(self, command, verbose=False, color=None, output_lines=None,
        output_file=None, quiet=False, exec_options=None):
        exec_options = exec_options or {}
        if output_file is not None:
            stdout_file = output_file
            stderr_file = output_file
        elif not quiet:
            stdout_file = sys.stdout
            stderr_file = sys.stderr
        else:
            stdout_file = None
            stderr_file = None

        result = None
        output_chunks = []
        color = self.get_color(color, out_file=stdout_file)
        self.tag_line(color("BEGIN", "header"), command, verbose=verbose,
                      color=color, out_file=stdout_file)

        start = time.time()
        try:
            while True:
                for code, output in self.execute_command(command,
                        **exec_options):
                    if code == STDOUT:
                        if output_lines is not None:
                            output_chunks.append(output)
                        elif stdout_file:
                            if not verbose or stdout_file:
                                stdout_file.write(output)
                            else:
                                for line in output.splitlines(True):
                                    stdout_file.write(
                                        "[%s] %s" % (color(self.node.name,
                                                           "node"), line))
                            stdout_file.flush()
                    elif code == STDERR:
                        if not verbose or stdout_file:
                            stderr_file.write(output)
                        elif stderr_file:
                            for line in output.splitlines(True):
                                stderr_file.write(
                                    "{%s} %s" % (color(self.node.name,
                                                       "node"), line))
                        stderr_file.flush()
                    else: # DONE
                        if output_lines is not None:
                            output_lines.extend(
                                ("".join(output_chunks)).splitlines())

                        if not output:
                            result = color("OK", "op_ok")
                        else:
                            result = color(output, "op_error")
                        return output
        except Exception as error:
            result = color("%s: %s" % (error.__class__.__name__, error),
                           "op_error")
            raise
        finally:
            elapsed = time.time() - start
            self.tag_line(color(elapsed % "END %.1fs", "header"), command, result=result,
                          verbose=verbose, color=color, out_file=stdout_file)
dataset/ETHPy150Open ohmu/poni/poni/rcontrol.py/RemoteControl.execute/swapped operands of `%`