Commit 1a1f441f authored by Rafael F's avatar Rafael F Committed by Sasha Goldshtein

usdt: fix argument passing on python3 (#984)

This fixes the following error:

$: ./tplist -v -v -l /usr/lib64/dri/i965_dri.so
argument 1: <class 'TypeError'>: wrong type
parent 8ef6eb8d
...@@ -130,7 +130,7 @@ class USDT(object): ...@@ -130,7 +130,7 @@ class USDT(object):
raise USDTException("USDT failed to instrument PID %d" % pid) raise USDTException("USDT failed to instrument PID %d" % pid)
elif path: elif path:
self.path = path self.path = path
self.context = lib.bcc_usdt_new_frompath(path) self.context = lib.bcc_usdt_new_frompath(path.encode('ascii'))
if self.context == None: if self.context == None:
raise USDTException("USDT failed to instrument path %s" % path) raise USDTException("USDT failed to instrument path %s" % path)
else: else:
......
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