do not crash in final console-conf screen if no host keys are read (mostly dry-run mode)
This commit is contained in:
parent
eea4240bac
commit
618c4e6e72
|
@ -89,6 +89,8 @@ The {keytype} host key fingerprints is:
|
||||||
|
|
||||||
def host_key_info():
|
def host_key_info():
|
||||||
fingerprints = host_key_fingerprints()
|
fingerprints = host_key_fingerprints()
|
||||||
|
if len(fingerprints) == 0:
|
||||||
|
return []
|
||||||
if len(fingerprints) == 1:
|
if len(fingerprints) == 1:
|
||||||
[(keytype, fingerprint)] = fingerprints
|
[(keytype, fingerprint)] = fingerprints
|
||||||
return single_host_key_tmpl.format(keytype=keytype, fingerprint=fingerprint)
|
return single_host_key_tmpl.format(keytype=keytype, fingerprint=fingerprint)
|
||||||
|
|
Loading…
Reference in New Issue