def lineage_for_certname(config, certname):
 def update_cert_for_name_match(candidate_lineage, rv):
  'Return cert if it has name certname, else return rv\n        '
  matching_lineage_name_cert = rv
  if (candidate_lineage.lineagename == certname):
   matching_lineage_name_cert = candidate_lineage
  return matching_lineage_name_cert
 return _search_lineages(config, update_cert_for_name_match, None)

def lineage_for_certname ( config , certname ) : def update_cert_for_name_match ( candidate_lineage , rv ) : matching_lineage_name_cert = rv if ( candidate_lineage . lineagename == certname ) : matching_lineage_name_cert = candidate_lineage return matching_lineage_name_cert return _search_lineages ( config , update_cert_for_name_match , None )
find a lineage object with name certname .