Skip to content

Commit

Permalink
Merge pull request #272 from asmeurer/return-module-fix
Browse files Browse the repository at this point in the history
Don't return early when "returning" from a module
  • Loading branch information
inducer committed Sep 3, 2017
2 parents 6be804e + 6e285b6 commit 676ee9d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pudb/debugger.py
Expand Up @@ -382,10 +382,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

0 comments on commit 676ee9d

Please sign in to comment.