Skip to content

Commit

Permalink
usdt: fix argument passing on python3 (iovisor#984)
Browse files Browse the repository at this point in the history
This fixes the following error:

$: ./tplist -v -v -l /usr/lib64/dri/i965_dri.so
argument 1: <class 'TypeError'>: wrong type
  • Loading branch information
r4f4 authored and goldshtn committed Mar 3, 2017
1 parent 8ef6eb8 commit 1a1f441
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/python/bcc/usdt.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def __init__(self, pid=None, path=None):
raise USDTException("USDT failed to instrument PID %d" % pid)
elif 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:
raise USDTException("USDT failed to instrument path %s" % path)
else:
Expand Down

0 comments on commit 1a1f441

Please sign in to comment.