Skip to content

Commit

Permalink
Allow PDB to enter post mortem. fixes (ansible#31086)
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienPalard authored and abadger committed Nov 28, 2017
1 parent ff938bf commit 53d9f9f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bin/ansible
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ if __name__ == '__main__':
display.error("User interrupted execution")
exit_code = 99
except Exception as e:
if C.DEFAULT_DEBUG:
# Show raw stacktraces in debug mode, It also allow pdb to
# enter post mortem mode.
raise
have_cli_options = cli is not None and cli.options is not None
display.error("Unexpected Exception, this is probably a bug: %s" % to_text(e), wrap_text=False)
if not have_cli_options or have_cli_options and cli.options.verbosity > 2:
Expand Down

0 comments on commit 53d9f9f

Please sign in to comment.