diff options
author | Michael Gugino <gugino.michael@yahoo.com> | 2018-01-23 15:28:46 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-23 15:28:46 -0500 |
commit | f738bf6bad477887fd7c718a788d27fa6348b121 (patch) | |
tree | 52d05b09b7c968a666c76fca52e3149da77bb786 /roles/lib_utils | |
parent | 13e1808da0d95ee6e72981fdce26505aa0eaa18a (diff) | |
parent | 9585e84e841486ead677c45e441d40368f51032a (diff) | |
download | openshift-f738bf6bad477887fd7c718a788d27fa6348b121.tar.gz openshift-f738bf6bad477887fd7c718a788d27fa6348b121.tar.bz2 openshift-f738bf6bad477887fd7c718a788d27fa6348b121.tar.xz openshift-f738bf6bad477887fd7c718a788d27fa6348b121.zip |
Merge pull request #6682 from giuseppe/fix-registries
CRI-O, Docker: Use images from the CentOS and Fedora registry
Diffstat (limited to 'roles/lib_utils')
-rw-r--r-- | roles/lib_utils/library/docker_creds.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/roles/lib_utils/library/docker_creds.py b/roles/lib_utils/library/docker_creds.py index d4674845e..b94c0b779 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]: @@ -151,7 +151,7 @@ def write_config(module, docker_config, dest): conf_file_path = os.path.join(dest, 'config.json') try: with open(conf_file_path, 'w') as conf_file: - json.dump(docker_config, conf_file, indent=8) + json.dump(docker_config.decode(), conf_file, indent=8) except IOError as ioerror: result = {'failed': True, 'changed': False, |