[clang-tidy] run-clang-tidy.py - fails using python 3.7
authorAndi-Bogdan Postelnicu <andi@mozilla.com>
Wed, 19 Sep 2018 11:52:20 +0000 (11:52 +0000)
committerAndi-Bogdan Postelnicu <andi@mozilla.com>
Wed, 19 Sep 2018 11:52:20 +0000 (11:52 +0000)
Differential Revision: https://reviews.llvm.org/D51220

llvm-svn: 342540

clang-tools-extra/clang-tidy/tool/run-clang-tidy.py

index 3852ba2..93635cb 100755 (executable)
@@ -167,9 +167,9 @@ def run_tidy(args, tmpdir, build_path, queue, lock, failed_files):
     if proc.returncode != 0:
       failed_files.append(name)
     with lock:
-      sys.stdout.write(' '.join(invocation) + '\n' + output + '\n')
-      if err > 0:
-        sys.stderr.write(err + '\n')
+      sys.stdout.write(' '.join(invocation) + '\n' + output.decode('utf-8') + '\n')
+      if len(err) > 0:
+        sys.stderr.write(err.decode('utf-8') + '\n')
     queue.task_done()