Fix Base64 decode TypeError (#36968)

```
TypeError: expected bytes-like object, not str
```
pull/36679/head
Patrick Marques 7 years ago committed by ansibot
parent b973fff276
commit 83aaa8137a

@ -239,7 +239,7 @@ def core(module):
def ssh_key_fingerprint(ssh_pub_key): def ssh_key_fingerprint(ssh_pub_key):
key = ssh_pub_key.split(None, 2)[1] key = ssh_pub_key.split(None, 2)[1]
fingerprint = hashlib.md5(base64.decodestring(key)).hexdigest() fingerprint = hashlib.md5(base64.b64decode(key)).hexdigest()
return ':'.join(a + b for a, b in zip(fingerprint[::2], fingerprint[1::2])) return ':'.join(a + b for a, b in zip(fingerprint[::2], fingerprint[1::2]))

Loading…
Cancel
Save