diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2016-09-05 00:00:40 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2016-09-05 00:00:40 +0000 |
commit | 1700d021f3764906db95c5b4bd80c173388f92c4 (patch) | |
tree | e9dd2270ca7e4ff6f9b757015f51f83635b58f87 /llvm/utils/lit | |
parent | 8769778aca3c3c679066850b26810a433383457d (diff) | |
download | bcm5719-llvm-1700d021f3764906db95c5b4bd80c173388f92c4.tar.gz bcm5719-llvm-1700d021f3764906db95c5b4bd80c173388f92c4.zip |
lit/util.py: Another fix for py3.
'str' object has no attribute 'decode'.
llvm-svn: 280641
Diffstat (limited to 'llvm/utils/lit')
-rw-r--r-- | llvm/utils/lit/lit/util.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/utils/lit/lit/util.py b/llvm/utils/lit/lit/util.py index 79eedfa18d4..d3187e3c3b3 100644 --- a/llvm/utils/lit/lit/util.py +++ b/llvm/utils/lit/lit/util.py @@ -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) |