read_raw_stdin() was opening a file in binary mode, but Popen
was being told to use text mode (universal_newlines). This is
benign on Python 2 but an error on Python 3.
Differential Revision: https://reviews.llvm.org/D98428
import subprocess
cmd = [readobj_path, '-elf-output-style=GNU', '--hex-dump={}'.format(section_name),
input_file]
- proc = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
- universal_newlines=True)
+ proc = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
if input_file == '-':
# From stdin