-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
{Core} Stop using legacy base64.decodebytes
#30464
Conversation
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
|
||
parts = openssh_pubkey.split() | ||
if len(parts) < 2: | ||
return False | ||
key_type = parts[0] | ||
key_string = parts[1] | ||
|
||
data = base64_decode(key_string.encode()) # pylint:disable=deprecated-method | ||
data = base64.b64decode(key_string) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
base64.b64decode()
takes str
input:
https://docs.python.org/3/library/base64.html#base64.b64decode
base64.b64decode(s, altchars=None, validate=False)
Decode the Base64 encoded bytes-like object or ASCII string s and return the decoded bytes.
base64.decodebytes
base64.decodebytes
I think
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Related command
az vm create
az aks create
Description
Created from #30451 (comment)
Stop using legacy
base64.decodebytes
.https://docs.python.org/3/library/base64.html