diff --git a/clang-tools-extra/test/clang-tidy/check_clang_tidy.py b/clang-tools-extra/test/clang-tidy/check_clang_tidy.py --- a/clang-tools-extra/test/clang-tidy/check_clang_tidy.py +++ b/clang-tools-extra/test/clang-tidy/check_clang_tidy.py @@ -173,7 +173,10 @@ print('Running ' + repr(args) + '...') clang_tidy_output = try_run(args) print('------------------------ clang-tidy output -----------------------') - print(clang_tidy_output.encode()) + if sys.version_info.major >= 3: + print(clang_tidy_output); + else: + print(clang_tidy_output.encode()) print('\n------------------------------------------------------------------') diff_output = try_run(['diff', '-u', self.original_file_name, self.temp_file_name], False)