Ensure we preserve the /api appended URL (#63472)

This commit is contained in:
Matt Martz 2019-10-14 13:34:07 -05:00 committed by GitHub
parent da46800f1b
commit d8389d9f55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View file

@ -0,0 +1,3 @@
bugfixes:
- ansible-galaxy - Ensure we preserve the new URL when appending ``/api`` for the case where
the GET succeeds on galaxy.ansible.com

View file

@ -57,9 +57,9 @@ def g_connect(versions):
raise AnsibleError("Tried to find galaxy API root at %s but no 'available_versions' are available on %s"
% (n_url, self.api_server))
# Update api_server to point to the "real" API root, which in this case
# was the configured url + '/api/' appended.
self.api_server = n_url
# Update api_server to point to the "real" API root, which in this case
# was the configured url + '/api/' appended.
self.api_server = n_url
# Default to only supporting v1, if only v1 is returned we also assume that v2 is available even though
# it isn't returned in the available_versions dict.