mirror of
https://github.com/cool-RR/PySnooper.git
synced 2026-07-25 11:54:07 +00:00
Handle missing frame.f_globals
This commit is contained in:
parent
5f34219df7
commit
18e758b0f9
1 changed files with 1 additions and 1 deletions
|
|
@ -13,7 +13,7 @@ class BaseVariable(object):
|
|||
|
||||
def items(self, frame):
|
||||
try:
|
||||
main_value = eval(self.code, frame.f_globals, frame.f_locals)
|
||||
main_value = eval(self.code, frame.f_globals or {}, frame.f_locals)
|
||||
except Exception:
|
||||
return ()
|
||||
return self._items(main_value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue