Skip to content

Commit

Permalink
fix(docker): don't use deprecated kwarg in json.loads
Browse files Browse the repository at this point in the history
In Docker credential cache code, use `.decode` on the `bytes` object
instead of deprecated `encoding` kwarg which was removed in py3.9.
  • Loading branch information
ethanwu10 committed Feb 27, 2021
1 parent a8b71a1 commit 4a3af9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rcds/challenge/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def get_auth_config(self, registry: str, api_client) -> Dict[str, str]:
header = docker.auth.get_config_header(api_client, registry)
if header is not None:
auth_config = json.loads(
base64.urlsafe_b64decode(header), encoding="ascii"
base64.urlsafe_b64decode(header).decode("ascii")
)
else:
auth_config = None
Expand Down

0 comments on commit 4a3af9f

Please sign in to comment.