From a6799140a8feb168a41f38f2aa3d9696d74a76ab Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Sun, 25 Feb 2018 19:20:15 -0500 Subject: [PATCH] CmdResult: set stdout/stderr parameters to bytes type Commit 7d0e6a44 effectively changed the supposed value of stdout and stderr attributes to being of type "bytes". But, the parameters with the same names, and their defaults values was not updated. Let's make stdout and stderr into bytes by default, both the parameters and attribute values when no other is given. Signed-off-by: Cleber Rosa --- avocado/utils/process.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/avocado/utils/process.py b/avocado/utils/process.py index 08c9ca8e..7dede815 100644 --- a/avocado/utils/process.py +++ b/avocado/utils/process.py @@ -263,9 +263,9 @@ class CmdResult(object): :param exit_status: exit code of the process :type exit_status: int :param stdout: content of the process stdout - :type stdout: str + :type stdout: bytes :param stderr: content of the process stderr - :type stderr: str + :type stderr: bytes :param duration: elapsed wall clock time running the process :type duration: float :param pid: ID of the process @@ -276,7 +276,7 @@ class CmdResult(object): :type encoding: str """ - def __init__(self, command="", stdout="", stderr="", + def __init__(self, command="", stdout=b"", stderr=b"", exit_status=None, duration=0, pid=None, encoding=None): self.command = command -- GitLab