Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools: fix some python3 bytes vs strings issues (iovisor#2205)
It fixes the following errors: $ execsnoop.py -q PCOMM PID PPID RET ARGS Traceback (most recent call last): File "_ctypes/callbacks.c", line 234, in 'calling callback function' File "/usr/lib/python3.6/site-packages/bcc/table.py", line 572, in raw_cb_ callback(cpu, data, size) File "tools/execsnoop.py", line 229, in print_event for arg in argv[event.pid] File "tools/execsnoop.py", line 229, in <listcomp> for arg in argv[event.pid] TypeError: a bytes-like object is required, not 'str' $ offcputime.py -K -f 5 Traceback (most recent call last): File "./tools/offcputime.py", line 298, in <module> print("%s %d" % (";".join(line), v.value)) TypeError: sequence item 1: expected str instance, bytes found $ offwaketime.py -f 5 Traceback (most recent call last): File "./tools/offwaketime.py", line 350, in <module> print("%s %d" % (";".join(line), v.value)) TypeError: sequence item 1: expected str instance, bytes found
- Loading branch information