summaryrefslogtreecommitdiffstats
path: root/roles/lib_utils/library
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2018-01-10 12:45:54 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2018-01-10 15:00:05 +0100
commitfa2ea50c05f61dc14858ee4d9c5ca44552733313 (patch)
tree31f24b326a632c46c25a47debcbef021b96d12d4 /roles/lib_utils/library
parent1cb712cd789d08aa5c4fc109ffc31eef2ff0693f (diff)
downloadopenshift-fa2ea50c05f61dc14858ee4d9c5ca44552733313.tar.gz
openshift-fa2ea50c05f61dc14858ee4d9c5ca44552733313.tar.bz2
openshift-fa2ea50c05f61dc14858ee4d9c5ca44552733313.tar.xz
openshift-fa2ea50c05f61dc14858ee4d9c5ca44552733313.zip
docker_creds: fix python3 exception
Solves this exception with python3: TypeError: a bytes-like object is required, not 'str Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'roles/lib_utils/library')
-rw-r--r--roles/lib_utils/library/docker_creds.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/roles/lib_utils/library/docker_creds.py b/roles/lib_utils/library/docker_creds.py
index d4674845e..e6f178525 100644
--- a/roles/lib_utils/library/docker_creds.py
+++ b/roles/lib_utils/library/docker_creds.py
@@ -135,7 +135,7 @@ def update_config(docker_config, registry, username, password):
docker_config['auths'][registry] = {}
# base64 encode our username:password string
- encoded_data = base64.b64encode('{}:{}'.format(username, password))
+ encoded_data = base64.b64encode('{}:{}'.format(username, password).encode())
# check if the same value is already present for idempotency.
if 'auth' in docker_config['auths'][registry]: