Fix ansible-galaxy import command to use argspec instead (#59898)

pull/59959/head
Jordan Borean 5 years ago committed by GitHub
parent 20b5ff5ab7
commit 88e3449189
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -913,11 +913,8 @@ class GalaxyCLI(CLI):
'FAILED': C.COLOR_ERROR,
}
if len(context.CLIARGS['args']) < 2:
raise AnsibleError("Expected a github_username and github_repository. Use --help.")
github_user = to_text(context.CLIARGS['args'][0], errors='surrogate_or_strict')
github_repo = to_text(context.CLIARGS['args'][1], errors='surrogate_or_strict')
github_user = to_text(context.CLIARGS['github_user'], errors='surrogate_or_strict')
github_repo = to_text(context.CLIARGS['github_repo'], errors='surrogate_or_strict')
if context.CLIARGS['check_status']:
task = self.api.get_import_task(github_user=github_user, github_repo=github_repo)

Loading…
Cancel
Save