mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-21 18:22:53 +01:00
[M68k] Fix extract-section.py under Python 3
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
This commit is contained in:
parent
4d1294714b
commit
b94c972042
@ -33,8 +33,7 @@ def get_raw_section_dump(readobj_path, section_name, input_file):
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user