Commit a91c8c24 authored by Javier Honduvilla Coto's avatar Javier Honduvilla Coto Committed by yonghong-song

Fix `trace_fields` Python3 encoding issue (#1745)

This PR fixes the encoding issue in Python3 by converting the argument passed to `find` to a bytearray.
parent 799f46a7
......@@ -1057,7 +1057,7 @@ class BPF(object):
# however, the illegal address will be printed out.
# Hence, both cases are handled here.
line = line[ts_end + 1:]
sym_end = line.find(":")
sym_end = line.find(b":")
msg = line[sym_end + 2:]
return (task, int(pid), int(cpu), flags, float(ts), msg)
except KeyboardInterrupt:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment