1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

now correctly traps unimplemented symlinks as subprograms

This commit is contained in:
Brian Coca 2015-11-02 12:46:04 -05:00
parent 3c1fe28bed
commit 56a2412dc2

View file

@ -74,12 +74,13 @@ if __name__ == '__main__':
elif me == 'ansible-galaxy':
from ansible.cli.galaxy import GalaxyCLI as mycli
cli = mycli(sys.argv, display=display)
if cli:
cli.parse()
sys.exit(cli.run())
else:
raise AnsibleError("Program not implemented: %s" % me)
try:
cli = mycli(sys.argv, display=display)
except NameError:
raise AnsibleError("Ansible sub-program not implemented: %s" % me)
cli.parse()
sys.exit(cli.run())
except AnsibleOptionsError as e:
cli.parser.print_help()