Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools: fix a python 3 map issue in dbstat and dbslower
In python 3, map returns an iterator and not a list anymore. This patch cast the map into a list. It fixes the following error: $ /usr/share/bcc/tools/dbstat mysql Traceback (most recent call last): File "/usr/share/bcc/tools/dbstat", line 95, in <module> bpf = BPF(text=program, usdt_contexts=usdts) File "/usr/lib/python3.6/site-packages/bcc/__init__.py", line 339, in __init__ ctx_array = (ct.c_void_p * len(usdt_contexts))() TypeError: object of type 'map' has no len()
- Loading branch information