diff --git a/utils/lit/lit/ProgressBar.py b/utils/lit/lit/ProgressBar.py index 0454ba29a43..2481bdfefa9 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 9e0c7a0be7a..9c43a216b2c 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')