Extract only the hostname part from self.registry

This is needed for update_dockercfg() to register only the host part
of a specified registry URL in the .dockercfg.
reviewable/pr18780/r1
Olaf Kilian 10 years ago
parent 7a2a75f6c0
commit f5e7ce00e7

@ -139,6 +139,10 @@ class DockerLoginManager:
if self.reauth:
self.log.append("Enforcing reauthentification")
# Extract hostname part from self.registry if url was specified.
registry_url = urlparse(self.registry)
self.registry = registry_url.netloc or registry_url.path
# Connect to registry and login if not already logged in or reauth is enforced.
try:
self.response = self.client.login(

Loading…
Cancel
Save