Commit 3d981513 authored by Rafael Fonseca's avatar Rafael Fonseca

usdt: convert text from bytes to str

This fixes a TypeError in python 3, e.g, when executing uobjnew

Traceback (most recent call last):
  File "./uobjnew", line 134, in <module>
    bpf = BPF(text=program, usdt_contexts=[usdt])
  File "/usr/lib/python3.5/site-packages/bcc/__init__.py", line 224, in __init__
    text = usdt_text + text
TypeError: can't concat bytes to str
parent 738a617a
......@@ -128,7 +128,7 @@ class USDT(object):
probe)
def get_text(self):
return lib.bcc_usdt_genargs(self.context)
return lib.bcc_usdt_genargs(self.context).decode()
def get_probe_arg_ctype(self, probe_name, arg_index):
return lib.bcc_usdt_get_probe_argctype(
......
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