提交 9b4511f9 编写于 作者: C Cleber Rosa

examples/tests/whiteboard.py: use bytes on base64.encodestring()

base64.encodestring() requires bytes on Python 3, and the whiteboard,
on the other hand, requires a string.

The default encodings will be used for encoding, and for encoding,
we want to be safe and use ascii which can be represented in the
various result formats.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 b81690cb
......@@ -38,7 +38,7 @@ class WhiteBoard(Test):
result = ''
for _ in range(0, iterations):
result += data
self.whiteboard = base64.encodestring(result)
self.whiteboard = base64.encodestring(result.encode()).decode('ascii')
if __name__ == "__main__":
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册