Skip to content

Commit e66666f

Browse files
committed
[Utils] Handle unicode characters in backtrace-check
rdar://63666780
1 parent b78bd2e commit e66666f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

utils/backtrace-check

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ def main():
7272
found_stack_trace_start = False
7373
found_stack_trace_entry = False
7474
for line in lines:
75+
# In Python 2, string objects can contain Unicode characters.
76+
if sys.version_info.major == 2:
77+
line = line.decode('utf-8', 'replace')
78+
7579
line = line.rstrip('\n')
7680

7781
# First see if we found the start of our stack trace start. If so, set

0 commit comments

Comments
 (0)