mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-24 21:05:23 +00:00
lit/util.py: Another fix for py3.
'str' object has no attribute 'decode'. llvm-svn: 280641
This commit is contained in:
parent
4127705ad2
commit
4061732e88
@ -20,6 +20,8 @@ def to_string(bytes):
|
||||
def convert_string(bytes):
|
||||
try:
|
||||
return to_string(bytes.decode('utf-8'))
|
||||
except AttributeError: # 'str' object has no attribute 'decode'.
|
||||
return str(bytes)
|
||||
except UnicodeError:
|
||||
return str(bytes)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user