Decode Binary data to Text
In Python 2, the str type was used for two different kinds of values: text and bytes, whereas in Python 3, these are separate and incompatible types. e.g. TypeError: a bytes-like object is required, not 'str' >>> 'abc' in b'abcd' Traceback (most recent call last): File "<stdin>", line 1, in <module> >>> type(b'abcd') <class 'bytes'> More background on this can be seen in https://www.redhat.com/archives/avocado-devel/2018-April/msg00002.html This patch helps to decode the binary data into a text string. Signed-off-by: NPing Li <pingl@redhat.com>
Showing
想要评论请 注册 或 登录