[populate_sshFingerprint] Ne pas présuposer que la valeur d'un attribut est une string
This commit is contained in:
parent
ad335866ea
commit
63895c98d4
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ def publish_keys():
|
||||||
validation=check_keys(keys)
|
validation=check_keys(keys)
|
||||||
machines=get_machines()
|
machines=get_machines()
|
||||||
for machine in machines:
|
for machine in machines:
|
||||||
sshkeys_old=[key.value for key in machine.get('sshFingerprint',[])]
|
sshkeys_old=[str(key) for key in machine.get('sshFingerprint',[])]
|
||||||
sshkeys_new=[key.decode('UTF-8') for algo,key in keys.items() if validation[algo]]
|
sshkeys_new=[key.decode('UTF-8') for algo,key in keys.items() if validation[algo]]
|
||||||
if not set(sshkeys_old)==set(sshkeys_new):
|
if not set(sshkeys_old)==set(sshkeys_new):
|
||||||
machine['sshFingerprint']=sshkeys_new
|
machine['sshFingerprint']=sshkeys_new
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue