Don't wrap text on most errors
This commit is contained in:
parent
f8e4aff4c1
commit
469aa0c26a
1 changed files with 3 additions and 3 deletions
|
@ -80,7 +80,7 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
except AnsibleOptionsError as e:
|
except AnsibleOptionsError as e:
|
||||||
cli.parser.print_help()
|
cli.parser.print_help()
|
||||||
display.error(str(e))
|
display.error(str(e), wrap_text=False)
|
||||||
sys.exit(5)
|
sys.exit(5)
|
||||||
except AnsibleParserError as e:
|
except AnsibleParserError as e:
|
||||||
display.error(str(e), wrap_text=False)
|
display.error(str(e), wrap_text=False)
|
||||||
|
@ -93,14 +93,14 @@ if __name__ == '__main__':
|
||||||
# display.error(str(e))
|
# display.error(str(e))
|
||||||
# sys.exit(2)
|
# sys.exit(2)
|
||||||
except AnsibleError as e:
|
except AnsibleError as e:
|
||||||
display.error(str(e))
|
display.error(str(e), wrap_text=False)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
display.error("User interrupted execution")
|
display.error("User interrupted execution")
|
||||||
sys.exit(99)
|
sys.exit(99)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
have_cli_options = cli is not None and cli.options is not None
|
have_cli_options = cli is not None and cli.options is not None
|
||||||
display.error("Unexpected Exception: %s" % str(e))
|
display.error("Unexpected Exception: %s" % str(e), wrap_text=False)
|
||||||
if not have_cli_options or have_cli_options and cli.options.verbosity > 2:
|
if not have_cli_options or have_cli_options and cli.options.verbosity > 2:
|
||||||
display.display("the full traceback was:\n\n%s" % traceback.format_exc())
|
display.display("the full traceback was:\n\n%s" % traceback.format_exc())
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue