Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python: handle null module in BPF.sym #1021

Merged
merged 1 commit into from
Mar 4, 2017
Merged

python: handle null module in BPF.sym #1021

merged 1 commit into from
Mar 4, 2017

Conversation

markdrayton
Copy link
Contributor

Check to see if module is None before attempting to call os.path.basename
on it. Before:

>>> BPF.sym(0x400001, 12345, show_module=True)
Traceback (most recent call last):
..
AttributeError: 'NoneType' object has no attribute 'rfind'

After:

>>> BPF.sym(0x400001, 12345, show_module=True)
'[unknown]'

Check to see if `module` is None before attempting to call `os.path.basename`
on it. Before:

```
>>> BPF.sym(0x400001, 12345, show_module=True)
Traceback (most recent call last):
..
AttributeError: 'NoneType' object has no attribute 'rfind'
```

After:

```
>>> BPF.sym(0x400001, 12345, show_module=True)
'[unknown]'
```
@4ast 4ast merged commit bdbc472 into iovisor:master Mar 4, 2017
@markdrayton markdrayton deleted the sym-mod-fix branch May 9, 2018 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants