Replace base64.decodestring with decodebytes
Base64.decodestring has been deprecated since 3.1 and removed in python 3.9, Replace it with base64.decodebytes from python3.1[1]. [1]https://docs.python.org/3.9/library/base64.html?highlight=deprecated#base64.decodebytes Change-Id: Ic5ae225d5cd8fefd70d3620518f19f16147135df
This commit is contained in:
parent
21f78897b6
commit
5215643b47
@ -45,13 +45,13 @@ def _get_session_from_kubeconfig():
|
||||
client_key_file = tempfile.NamedTemporaryFile(delete=False)
|
||||
ca_cert_file = tempfile.NamedTemporaryFile(delete=False)
|
||||
|
||||
client_cert_file.write(base64.decodestring(client_cert_data.encode()))
|
||||
client_cert_file.write(base64.decodebytes(client_cert_data.encode()))
|
||||
client_cert_file.close()
|
||||
|
||||
client_key_file.write(base64.decodestring(client_key_data.encode()))
|
||||
client_key_file.write(base64.decodebytes(client_key_data.encode()))
|
||||
client_key_file.close()
|
||||
|
||||
ca_cert_file.write(base64.decodestring(ca_cert_data.encode()))
|
||||
ca_cert_file.write(base64.decodebytes(ca_cert_data.encode()))
|
||||
ca_cert_file.close()
|
||||
|
||||
session = requests.Session()
|
||||
|
Loading…
Reference in New Issue
Block a user