fix clang-tidy script for python 3

Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/15360

Differential Revision: D13509668

Pulled By: suo

fbshipit-source-id: a3448a115eaac8dd4c3f179901a23bdbc5098408
This commit is contained in:
Michael Suo 2018-12-18 15:01:10 -08:00 committed by Facebook Github Bot
parent 2469f7e02e
commit f5da198236

View File

@ -146,7 +146,7 @@ def run_shell_commands_in_parallel(commands):
build_entries = [build_template.format(i=i, cmd=' '.join([quote(s) for s in command]))
for i, command in enumerate(commands)]
file_contents = ninja_template.format(build_rules='\n'.join(build_entries))
file_contents = ninja_template.format(build_rules='\n'.join(build_entries)).encode()
f = tempfile.NamedTemporaryFile(delete=False)
try:
f.write(file_contents)