Skip to content

Commit c5176c0

Browse files
authored
Update swift-rpathize.py to work with Python 3.8 and Python 2.7 (#34332)
* Update swift-rpathize.py to work with Python 3.8 and Python 2.7 In Python 2, str() is also a kind of bytes blob In Python 3, str() is a Unicode string that's unrelated * Avoid `l` as a variable name Python-lint correctly warns about single-character variables that can be confused with numbers
1 parent 0883836 commit c5176c0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

utils/swift-rpathize.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ def rpathize(filename):
6464

6565
# Build a command to invoke install_name_tool.
6666
command = ['install_name_tool']
67-
for line in dylibsOutput.splitlines():
67+
for binaryline in dylibsOutput.splitlines():
68+
line = binaryline.decode("utf-8", "strict")
6869
match = dylib_regex.match(line)
6970
if match:
7071
command.append('-change')

0 commit comments

Comments
 (0)