Skip to content

Commit

Permalink
Merge branch 'master' of github.com:inducer/pudb
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Oct 29, 2017
2 parents 54fca02 + e7b1d9d commit 5ffbd1a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions pudb/debugger.py
Expand Up @@ -409,10 +409,8 @@ def user_line(self, frame):

def user_return(self, frame, return_value):
"""This function is called when a return trap is set here."""
if frame.f_code.co_name == '<module>':
return

frame.f_locals['__return__'] = return_value
if frame.f_code.co_name != '<module>':
frame.f_locals['__return__'] = return_value

if self._wait_for_mainpyfile:
if (self.mainpyfile != self.canonic(frame.f_code.co_filename)
Expand Down
2 changes: 1 addition & 1 deletion pudb/var_view.py
Expand Up @@ -259,7 +259,7 @@ def type_stringifier(value):
except Exception:
pass

elif hasattr(value, "safely_stringify_for_pudb"):
elif hasattr(type(value), "safely_stringify_for_pudb"):
try:
# (E.g.) Mock objects will pretend to have this
# and return nonsense.
Expand Down

0 comments on commit 5ffbd1a

Please sign in to comment.