@@ -744,7 +744,7 @@ def build_secret_dockerconfigjson(secret_name, image_registry_auth_infos, obj_la
744744 the yaml to the server with create()). This method does not use/require oc to be resident
745745 on the python host.
746746 :param secret_name: The metadata.name to include
747- :paran image_registry_auth_infos: An iterable collection of ImageRegistryAuthInfo
747+ :param image_registry_auth_infos: An iterable collection of ImageRegistryAuthInfo
748748 :param obj_labels: Additional labels to include in the resulting secret metadata.
749749 :return: A python dict of a secret resource.
750750 """
@@ -755,7 +755,7 @@ def build_secret_dockerconfigjson(secret_name, image_registry_auth_infos, obj_la
755755 auths = {} # A map of registry urls to a map with a single element called 'auth'
756756
757757 for ira in image_registry_auth_infos :
758- b64_username_password = base64 .b64encode ('{}:{}' .format (ira .username , ira .password ))
758+ b64_username_password = base64 .b64encode ('{}:{}' .format (ira .username , ira .password ). encode ()). decode ( )
759759 auths [ira .registry_url ] = {
760760 'auth' : b64_username_password
761761 }
@@ -769,7 +769,7 @@ def build_secret_dockerconfigjson(secret_name, image_registry_auth_infos, obj_la
769769 import json
770770
771771 # Next, base64 encode the entire file.
772- b64_dockerconfigjson = base64 .b64encode (json .dumps (dockerconfig , indent = 4 ))
772+ b64_dockerconfigjson = base64 .b64encode (json .dumps (dockerconfig , indent = 4 ). encode ()). decode ( )
773773
774774 # And stick it into the secret's data
775775 data = {
0 commit comments