mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
now all cli use display.error
This commit is contained in:
parent
14fb4383f3
commit
9898522a00
2 changed files with 4 additions and 4 deletions
|
@ -191,8 +191,8 @@ if __name__ == "__main__":
|
|||
try:
|
||||
sys.exit(main(display, sys.argv[1:]))
|
||||
except AnsibleError as e:
|
||||
display.display("[ERROR]: %s" % e, color='red', stderr=True)
|
||||
display.error(str(e))
|
||||
sys.exit(1)
|
||||
except KeyboardInterrupt:
|
||||
display.display("[ERROR]: interrupted", color='red', stderr=True)
|
||||
display.error("interrupted")
|
||||
sys.exit(1)
|
||||
|
|
|
@ -186,8 +186,8 @@ if __name__ == "__main__":
|
|||
(options, args) = cli.parse()
|
||||
sys.exit(cli.run(options, args))
|
||||
except AnsibleError as e:
|
||||
display.display("[ERROR]: %s" % e, color='red', stderr=True)
|
||||
display.error(str(e))
|
||||
sys.exit(1)
|
||||
except KeyboardInterrupt:
|
||||
display.display("[ERROR]: interrupted", color='red', stderr=True)
|
||||
display.error("interrupted")
|
||||
sys.exit(1)
|
||||
|
|
Loading…
Reference in a new issue