Commit bf830b01 authored by Aaron Ballman's avatar Aaron Ballman
Browse files

Switch to opening the temp file in binary mode

This corrects an issue where the script would write the file with the
incorrect line endings on Windows.
parent bc840b21
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -180,7 +180,7 @@ def process_file(source_file, clang_binary, cmdline_filters, cmdline_opts,
        
            filter_json(j, filters, out_asts)
        
    with tempfile.NamedTemporaryFile("w", delete=False) as f:
    with tempfile.NamedTemporaryFile("wb", delete=False) as f:
        with open(source_file, "r") as srcf:
            for line in srcf.readlines():
                # copy up to the note: