Skip to content

Commit

Permalink
Provide verbose details about which galaxy server was used (#61190)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanCoding authored and jborean93 committed Aug 22, 2019
1 parent 18f7c3b commit e5861eb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/ansible/galaxy/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ def from_name(collection, apis, requirement, force, parent=None):
resp = json.load(open_url(n_collection_url, validate_certs=api.validate_certs, headers=headers))
except urllib_error.HTTPError as err:
if err.code == 404:
display.vvv("Collection '%s' is not available from server %s %s" % (collection, api.name, api.api_server))
continue
raise

Expand All @@ -344,6 +345,7 @@ def from_name(collection, apis, requirement, force, parent=None):
resp = json.load(open_url(to_native(resp['next'], errors='surrogate_or_strict'),
validate_certs=api.validate_certs, headers=headers))

display.vvv("Collection '%s' obtained from server %s %s" % (collection, api.name, api.api_server))
break
else:
raise AnsibleError("Failed to find collection %s:%s" % (collection, requirement))
Expand Down

0 comments on commit e5861eb

Please sign in to comment.