Skip to content

Commit 06c6063

Browse files
fluetmchris-crone
authored andcommitted
Correct INDEX_URL logic in build.py _set_auth_headers
Signed-off-by: Matt Fluet <[email protected]>
1 parent c238315 commit 06c6063

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docker/api/build.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,8 @@ def _set_auth_headers(self, headers):
308308
auth_data = self._auth_configs.get_all_credentials()
309309

310310
# See https://github.com/docker/docker-py/issues/1683
311-
if auth.INDEX_URL not in auth_data and auth.INDEX_URL in auth_data:
311+
if (auth.INDEX_URL not in auth_data and
312+
auth.INDEX_NAME in auth_data):
312313
auth_data[auth.INDEX_URL] = auth_data.get(auth.INDEX_NAME, {})
313314

314315
log.debug(

0 commit comments

Comments
 (0)