def getHostKeyAlgorithms(host, options):
 knownHosts = KnownHostsFile.fromPath(FilePath((options['known-hosts'] or os.path.expanduser(_KNOWN_HOSTS))))
 keyTypes = []
 for entry in knownHosts.iterentries():
  if entry.matchesHost(host):
   if (entry.keyType not in keyTypes):
    keyTypes.append(entry.keyType)
 return (keyTypes or None)

def getHostKeyAlgorithms ( host , options ) : knownHosts = KnownHostsFile . fromPath ( FilePath ( ( options [ 'known-hosts' ] or os . path . expanduser ( _KNOWN_HOSTS ) ) ) ) keyTypes = [ ] for entry in knownHosts . iterentries ( ) : if entry . matchesHost ( host ) : if ( entry . keyType not in keyTypes ) : keyTypes . append ( entry . keyType ) return ( keyTypes or None )
look in known_hosts for a key corresponding to c{host} .