[cloud][py3] Use to_bytes in ec2_key module in two more places (#26936)
PR #23051 fixes the first failure of this, but it doesn't fix the successive calls.
This commit is contained in:
parent
16f796460f
commit
65da6a0789
1 changed files with 2 additions and 2 deletions
|
@ -196,7 +196,7 @@ def main():
|
|||
test = ec2.get_key_pair(tmpkeyname)
|
||||
|
||||
# create tmp key
|
||||
tmpkey = ec2.import_key_pair(tmpkeyname, key_material)
|
||||
tmpkey = ec2.import_key_pair(tmpkeyname, to_bytes(key_material))
|
||||
# get tmp key fingerprint
|
||||
tmpfingerprint = tmpkey.fingerprint
|
||||
# delete tmp key
|
||||
|
@ -205,7 +205,7 @@ def main():
|
|||
if key.fingerprint != tmpfingerprint:
|
||||
if not module.check_mode:
|
||||
key.delete()
|
||||
key = ec2.import_key_pair(name, key_material)
|
||||
key = ec2.import_key_pair(name, to_bytes(key_material))
|
||||
|
||||
if wait:
|
||||
start = time.time()
|
||||
|
|
Loading…
Reference in a new issue