[PATCH] D98428: [M68k] Fix extract-section.py under Python 3
Ricky Taylor via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 11 08:00:52 PST 2021
ricky26 created this revision.
ricky26 added a reviewer: myhsu.
ricky26 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D98428
Files:
llvm/utils/extract-section.py
Index: llvm/utils/extract-section.py
===================================================================
--- llvm/utils/extract-section.py
+++ llvm/utils/extract-section.py
@@ -33,8 +33,7 @@
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98428.329971.patch
Type: text/x-patch
Size: 579 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210311/66b51461/attachment.bin>
More information about the llvm-commits
mailing list