mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-25 15:45:23 +00:00
convert decodestring -> decodebytes for python 3.10 compatibility
This commit is contained in:
parent
aebcbb63fd
commit
33a7e30fc5
1 changed files with 1 additions and 1 deletions
|
@ -30,7 +30,7 @@ def validate_ssh_key(key):
|
||||||
username = array[2]
|
username = array[2]
|
||||||
# must have only valid rsa-ssh key characters ie binascii characters
|
# must have only valid rsa-ssh key characters ie binascii characters
|
||||||
try:
|
try:
|
||||||
data = base64.decodestring(string)
|
data = base64.decodebytes(string)
|
||||||
except binascii.Error:
|
except binascii.Error:
|
||||||
return False
|
return False
|
||||||
# unpack the contents of data, from data[:4] , property of ssh key .
|
# unpack the contents of data, from data[:4] , property of ssh key .
|
||||||
|
|
Loading…
Reference in a new issue