_OutputRedirectingPdb.trace_dispatch(): Return the base class's

trace_dispatch() result in a more obvious, and more robust way.
This commit is contained in:
Tim Peters 2004-11-08 22:30:28 +00:00
parent 50c6bdb1d6
commit d7bbbbc594
1 changed files with 5 additions and 4 deletions

View File

@ -348,10 +348,11 @@ def trace_dispatch(self, *args):
save_stdout = sys.stdout
sys.stdout = self.__out
# Call Pdb's trace dispatch method.
result = pdb.Pdb.trace_dispatch(self, *args)
# Restore stdout.
sys.stdout = save_stdout
return result
try:
return pdb.Pdb.trace_dispatch(self, *args)
finally:
# Restore stdout.
sys.stdout = save_stdout
# [XX] Normalize with respect to os.path.pardir?
def _module_relative_path(module, path):