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

Use tb_or_frame instead of undefined tb #16

Merged
merged 1 commit into from Aug 25, 2019
Merged

Conversation

alexmojaki
Copy link
Contributor

@alexmojaki alexmojaki commented Aug 25, 2019

This code:

from stackprinter.extraction import get_info

get_info(None)

raises:

Traceback (most recent call last):
  File "/Users/alexhall/Library/Preferences/PyCharm2018.3/scratches/scratch_421.py", line 3, in <module>
    get_info(None)
  File "/Users/alexhall/git-repos/stackprinter/stackprinter/extraction.py", line 73, in get_info
    raise ValueError('Cant inspect this: ' + repr(tb))
UnboundLocalError: local variable 'tb' referenced before assignment

This PR changes it to the correct:

ValueError: Cant inspect this: None

@cknd
Copy link
Owner

cknd commented Aug 25, 2019

praise be! 🙏

@cknd cknd merged commit 87c9140 into cknd:master Aug 25, 2019
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.

None yet

2 participants