Skip to content
This repository has been archived by the owner on Jun 4, 2021. It is now read-only.

Fix encoding bug when calling Popen.communicate #138

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion client/docker_creds_.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ def Get(self):

# Some keychains expect a scheme:
# https://github.com/bazelbuild/rules_docker/issues/111
stdout = p.communicate(input='https://' + self._registry)[0]
url = 'https://' + self._registry
stdout = p.communicate(input=url.encode('utf-8'))[0]
if stdout.strip() == _MAGIC_NOT_FOUND_MESSAGE:
# Use empty auth when no auth is found.
logging.info('Credentials not found, falling back to anonymous auth.')
Expand Down