diff options
author | Daniel Dunbar <daniel@zuster.org> | 2013-08-07 23:09:55 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2013-08-07 23:09:55 +0000 |
commit | 05fb743a99ac6a1fc147682a2262a6190f193ab4 (patch) | |
tree | d0b7d9750e1e2ab13619e093fe102607bcce481d /utils | |
parent | f34117d84991d2bd2c722cf3a36244fe4acdc79c (diff) | |
download | llvm-05fb743a99ac6a1fc147682a2262a6190f193ab4.tar.gz llvm-05fb743a99ac6a1fc147682a2262a6190f193ab4.tar.bz2 llvm-05fb743a99ac6a1fc147682a2262a6190f193ab4.tar.xz |
[lit] Make string encoding issues explicit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187931 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/lit/lit/ProgressBar.py | 6 | ||||
-rw-r--r-- | utils/lit/lit/TestFormats.py | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/utils/lit/lit/ProgressBar.py b/utils/lit/lit/ProgressBar.py index 0454ba29a4..2481bdfefa 100644 --- a/utils/lit/lit/ProgressBar.py +++ b/utils/lit/lit/ProgressBar.py @@ -135,7 +135,11 @@ class TerminalController: # For any modern terminal, we should be able to just ignore # these, so strip them out. import curses - cap = curses.tigetstr(cap_name) or '' + cap = curses.tigetstr(cap_name) + if cap is None: + cap = '' + else: + cap = cap.decode('ascii') return re.sub(r'\$<\d+>[/*]?', '', cap) def render(self, template): diff --git a/utils/lit/lit/TestFormats.py b/utils/lit/lit/TestFormats.py index 9e0c7a0be7..9c43a216b2 100644 --- a/utils/lit/lit/TestFormats.py +++ b/utils/lit/lit/TestFormats.py @@ -30,6 +30,7 @@ class GoogleTest(object): try: lines = lit.Util.capture([path, '--gtest_list_tests'], env=localConfig.environment) + lines = lines.decode('ascii') if kIsWindows: lines = lines.replace('\r', '') lines = lines.split('\n') |