diff --git a/doc/connection.rst b/doc/connection.rst index 9c19c42..afc0e2a 100644 --- a/doc/connection.rst +++ b/doc/connection.rst @@ -40,7 +40,7 @@ class that implements the following methods. :param timeout: timeout (in seconds) for the transfer; if the transfer does not complete within this period, an exception will be raised. -.. method:: execute(self, command, timeout=None, check_exit_code=False, as_root=False, will_succeed=False) +.. method:: execute(self, command, timeout=None, check_exit_code=False, as_root=False, strip_colors=True, will_succeed=False) Execute the specified command on the connected device and return its output. @@ -53,6 +53,8 @@ class that implements the following methods. raised if it is not ``0``. :param as_root: The command will be executed as root. This will fail on unrooted connected devices. + :param strip_colours: The command output will have colour encodings and + most ANSI escape sequences striped out before returning. :param will_succeed: The command is assumed to always succeed, unless there is an issue in the environment like the loss of network connectivity. That will make the method always raise an instance of a subclass of diff --git a/doc/target.rst b/doc/target.rst index 1169a0f..ab5d0fd 100644 --- a/doc/target.rst +++ b/doc/target.rst @@ -232,7 +232,7 @@ Target :param timeout: timeout (in seconds) for the transfer; if the transfer does not complete within this period, an exception will be raised. -.. method:: Target.execute(command [, timeout [, check_exit_code [, as_root, [will_succeed]]]]) +.. method:: Target.execute(command [, timeout [, check_exit_code [, as_root [, strip_colors [, will_succeed]]]]]) Execute the specified command on the target device and return its output. @@ -245,6 +245,8 @@ Target raised if it is not ``0``. :param as_root: The command will be executed as root. This will fail on unrooted targets. + :param strip_colours: The command output will have colour encodings and + most ANSI escape sequences striped out before returning. :param will_succeed: The command is assumed to always succeed, unless there is an issue in the environment like the loss of network connectivity. That will make the method always raise an instance of a subclass of