run-clang-tidy: Use check_call instead of check_output
authorKevin Funk <kfunk@kde.org>
Tue, 28 Nov 2017 07:17:01 +0000 (07:17 +0000)
committerKevin Funk <kfunk@kde.org>
Tue, 28 Nov 2017 07:17:01 +0000 (07:17 +0000)
Summary:
Streamlines the output under Python 3.x.

Before:
```
b'Enabled checks:\n    clang-analyzer-apiModeling.google.GTest\n ...
```

After:
```
Enabled checks:
    clang-analyzer-apiModeling.google.GTest
...
```

Reviewers: cfe-commits, alexfh

Reviewed By: alexfh

Subscribers: JDevlieghere

Differential Revision: https://reviews.llvm.org/D37482

Change-Id: I6287104bc73926ae6d0f66c15c250c3cb44bee33
llvm-svn: 319148

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

index 15b21d7..379ad71 100755 (executable)
@@ -222,7 +222,7 @@ def main():
     if args.checks:
       invocation.append('-checks=' + args.checks)
     invocation.append('-')
-    print(subprocess.check_output(invocation))
+    subprocess.check_call(invocation)
   except:
     print("Unable to run clang-tidy.", file=sys.stderr)
     sys.exit(1)