Skip to content

Commit 53dddee

Browse files
committedJan 10, 2019
[Python] Update checkDsymForUUIDIsOn to be compatible with Python 3.
Summary: In python 2, strings and bytes are the same, but they're not in python 3, hence the return of read() needs an explicit conversion. While I'm around, rename the return of Popen() from `pipe` to `process`, as that's what Popen returns. Reviewers: JDevlieghere, friss, zturner, aprantl, serge-sans-paille Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D56517 llvm-svn: 350788
1 parent 8d530b7 commit 53dddee

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed
 

‎lldb/packages/Python/lldbsuite/test/dotest.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -1061,14 +1061,15 @@ def getMyCommandLine():
10611061

10621062
def checkDsymForUUIDIsNotOn():
10631063
cmd = ["defaults", "read", "com.apple.DebugSymbols"]
1064-
pipe = subprocess.Popen(
1064+
process = subprocess.Popen(
10651065
cmd,
10661066
stdout=subprocess.PIPE,
10671067
stderr=subprocess.STDOUT)
1068-
cmd_output = pipe.stdout.read()
1069-
if cmd_output and "DBGFileMappedPaths = " in cmd_output:
1068+
cmd_output = process.stdout.read()
1069+
output_str = cmd_output.decode("utf-8")
1070+
if "DBGFileMappedPaths = " in output_str:
10701071
print("%s =>" % ' '.join(cmd))
1071-
print(cmd_output)
1072+
print(output_str)
10721073
print(
10731074
"Disable automatic lookup and caching of dSYMs before running the test suite!")
10741075
print("Exiting...")

0 commit comments

Comments
 (0)
Please sign in to comment.