diff options
author | Julien Palard <julien@palard.fr> | 2017-11-21 20:11:53 +0100 |
---|---|---|
committer | Toshio Kuratomi <a.badger@gmail.com> | 2017-11-28 22:10:08 +0100 |
commit | 53d9f9ffae2ace26ca5d78ecb4e7f053556f7ab4 (patch) | |
tree | 57868d6a10e825c7844acee53dbedcfc6596afbc /bin | |
parent | Reset persistent connection only if it is active (#33238) (diff) | |
download | ansible-53d9f9ffae2ace26ca5d78ecb4e7f053556f7ab4.tar.xz ansible-53d9f9ffae2ace26ca5d78ecb4e7f053556f7ab4.zip |
Allow PDB to enter post mortem. fixes (#31086)
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ansible | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/ansible b/bin/ansible index 5c30b962dc..3a2f03e64e 100755 --- a/bin/ansible +++ b/bin/ansible @@ -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: |