• Gary Lin's avatar
    opensnoop: convert args.name to bytes · 40fd6692
    Gary Lin authored
    This commit fixes the following error with python3:
    
    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 508, in raw_cb_
        callback(cpu, data, size)
      File "./opensnoop.py", line 169, in print_event
        if args.name and args.name not in event.comm:
    TypeError: a bytes-like object is required, not 'str'
    Signed-off-by: default avatarGary Lin <glin@suse.com>
    40fd6692
opensnoop.py 5.27 KB