Correct INDEX_URL logic in build.py _set_auth_headers

Signed-off-by: Matt Fluet <matt.fluet@appian.com>
This commit is contained in:
Matt Fluet 2019-08-05 18:31:56 -04:00 committed by Christopher Crone
parent c238315c64
commit 06c606300c
1 changed files with 2 additions and 1 deletions

View File

@ -308,7 +308,8 @@ class BuildApiMixin(object):
auth_data = self._auth_configs.get_all_credentials()
# See https://github.com/docker/docker-py/issues/1683
if auth.INDEX_URL not in auth_data and auth.INDEX_URL in auth_data:
if (auth.INDEX_URL not in auth_data and
auth.INDEX_NAME in auth_data):
auth_data[auth.INDEX_URL] = auth_data.get(auth.INDEX_NAME, {})
log.debug(