Replace exit
with sys.exit
in Galaxy CLI.
This commit is contained in:
parent
2701bb940a
commit
2b24fae429
2 changed files with 4 additions and 1 deletions
2
changelogs/fragments/galaxy-sys-exit.yml
Normal file
2
changelogs/fragments/galaxy-sys-exit.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- ansible-galaxy - Use ``sys.exit`` instead of ``exit`` when reporting an error for the removed login command.
|
|
@ -8,6 +8,7 @@ __metaclass__ = type
|
|||
import os.path
|
||||
import re
|
||||
import shutil
|
||||
import sys
|
||||
import textwrap
|
||||
import time
|
||||
import yaml
|
||||
|
@ -119,7 +120,7 @@ class GalaxyCLI(CLI):
|
|||
"to Galaxy. The key can be found at https://galaxy.ansible.com/me/preferences, and passed to the "
|
||||
"ansible-galaxy CLI via a file at {0} or (insecurely) via the `--token` "
|
||||
"command-line argument.".format(to_text(C.GALAXY_TOKEN_PATH)))
|
||||
exit(1)
|
||||
sys.exit(1)
|
||||
|
||||
self.api_servers = []
|
||||
self.galaxy = None
|
||||
|
|
Loading…
Add table
Reference in a new issue