Fix AttributeError: 'str' object has no attribute 'decode' for python3

Story: 2003433
Task: 28928

Change-Id: I4c601a72232402e45fe70e0d29de031ff294a4d7
Signed-off-by: Sun Austin <austin.sun@intel.com>
This commit is contained in:
Sun Austin 2019-01-16 10:17:36 +08:00
parent 845f41a85c
commit 558a0b5c71

View File

@ -64,7 +64,7 @@ class Fault(object):
@staticmethod
def _unicode(value):
if isinstance(value, str):
if six.PY2 and isinstance(value, str):
return six.text_type(value.decode('utf-8'))
else:
return value