fix unexpected label string
This commit is contained in:
parent
a1d633dc5f
commit
08650d5e8e
|
@ -5,6 +5,8 @@ def ustr(v):
|
||||||
if six.PY3:
|
if six.PY3:
|
||||||
if isinstance(v, str):
|
if isinstance(v, str):
|
||||||
return v
|
return v
|
||||||
|
elif isinstance(v, bytes):
|
||||||
|
return v.decode("utf-8", "replace")
|
||||||
else:
|
else:
|
||||||
return str(v)
|
return str(v)
|
||||||
# assume six.PY2
|
# assume six.PY2
|
||||||
|
|
Reference in New Issue
Block a user