Skip to content

Commit

Permalink
always log unexpected exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoca committed Oct 13, 2016
1 parent cdb5a22 commit 18d3e05
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/ansible
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,11 @@ if __name__ == '__main__':
have_cli_options = cli is not None and cli.options is not None
display.error("Unexpected Exception: %s" % to_text(e), wrap_text=False)
if not have_cli_options or have_cli_options and cli.options.verbosity > 2:
display.display(u"the full traceback was:\n\n%s" % to_text(traceback.format_exc()))
log_only = False
else:
display.display("to see the full traceback, use -vvv")
log_only = True
display.display(u"the full traceback was:\n\n%s" % to_text(traceback.format_exc()), log_only=log_only)
exit_code = 250
finally:
# Remove ansible tempdir
Expand Down

0 comments on commit 18d3e05

Please sign in to comment.