mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-04 08:16:49 +00:00
[libc++] Improve Python 3 compatibility for merge_archives.py
Popen.communicate() method in Python 2 returns a pair of strings, and in Python 3 it returns a pair of byte-like objects unless universal_newlines is set to True. This led to an error when using Python 3. With this patch, merge_archives.py works fine with Python 3. Thanks to Sergej Jaskiewicz for the patch. Differential Revision: https://reviews.llvm.org/D66649 llvm-svn: 369764
This commit is contained in:
parent
dabfea85fc
commit
344eee9227
@ -50,7 +50,8 @@ def execute_command(cmd, cwd=None):
|
||||
'stdin': subprocess.PIPE,
|
||||
'stdout': subprocess.PIPE,
|
||||
'stderr': subprocess.PIPE,
|
||||
'cwd': cwd
|
||||
'cwd': cwd,
|
||||
'universal_newlines': True
|
||||
}
|
||||
p = subprocess.Popen(cmd, **kwargs)
|
||||
out, err = p.communicate()
|
||||
|
Loading…
x
Reference in New Issue
Block a user