Commit bdbc4726 authored by 4ast's avatar 4ast Committed by GitHub

Merge pull request #1021 from markdrayton/sym-mod-fix

python: handle null module in BPF.sym
parents c924193f dcf8cf98
...@@ -1008,7 +1008,8 @@ class BPF(object): ...@@ -1008,7 +1008,8 @@ class BPF(object):
offset = "+0x%x" % offset if show_offset and name is not None else "" offset = "+0x%x" % offset if show_offset and name is not None else ""
name = name or "[unknown]" name = name or "[unknown]"
name = name + offset name = name + offset
module = " [%s]" % os.path.basename(module) if show_module else "" module = " [%s]" % os.path.basename(module) \
if show_module and module is not None else ""
return name + module return name + module
@staticmethod @staticmethod
......
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