def simpleOpenIDTransformer(endpoint):
 if ('http://openid.net/signon/1.0' not in endpoint.type_uris):
  return None
 delegates = list(endpoint.service_element.findall('{http://openid.net/xmlns/1.0}Delegate'))
 assert (len(delegates) == 1)
 delegate = delegates[0].text
 return (endpoint.uri, delegate)

def simpleOpenIDTransformer ( endpoint ) : if ( 'http://openid.net/signon/1.0' not in endpoint . type_uris ) : return None delegates = list ( endpoint . service_element . findall ( '{http://openid.net/xmlns/1.0}Delegate' ) ) assert ( len ( delegates ) == 1 ) delegate = delegates [ 0 ] . text return ( endpoint . uri , delegate )
function to extract information from an openid service element .