提交 a6799140 编写于 作者: C Cleber Rosa

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: NCleber Rosa <crosa@redhat.com>
上级 d11a0313
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册