fix python3 issue for ttysnoop.py (#1912)
Fix issue #1910
Otherwise, we will have a type mismatch like below:
[root@aborniakFC tools]# ./ttysnoop 1
Traceback (most recent call last):
File "./ttysnoop", line 102, in <module>
b = BPF(text=bpf_text)
File "/usr/lib/python3.6/site-packages/bcc/__init__.py", line 337, in __init__
self._trace_autoload()
File "/usr/lib/python3.6/site-packages/bcc/__init__.py", line 1030, in _trace_autoload
event=self.fix_syscall_fnname(func_name[8:]),
File "/usr/lib/python3.6/site-packages/bcc/__init__.py", line 569, in fix_syscall_fnname
if name.startswith(prefix):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str
[root@aborniakFC tools]#
Signed-off-by: Yonghong Song <yhs@fb.com>
Showing
Please register or sign in to comment