def is_key_line(key):
 if (not key):
  return False
 if (key[0] == u'#'):
  return False
 if (key[0] == u'@'):
  return False
 return ((u' ssh-rsa ' in key) or (u' ecdsa-sha2-nistp256 ' in key) or (u' ssh-ed25519 ' in key))

def is_key_line ( key ) : if ( not key ) : return False if ( key [ 0 ] == u'#' ) : return False if ( key [ 0 ] == u'@' ) : return False return ( ( u' ssh-rsa ' in key ) or ( u' ecdsa-sha2-nistp256 ' in key ) or ( u' ssh-ed25519 ' in key ) )
checks whether this line looks like a valid known_hosts line .