def discoverYadis(uri):
 response = yadisDiscover(uri)
 yadis_url = response.normalized_uri
 body = response.response_text
 try:
  openid_services = OpenIDServiceEndpoint.fromXRDS(yadis_url, body)
 except XRDSError:
  openid_services = []
 if (not openid_services):
  if response.isXRDS():
   return discoverNoYadis(uri)
  openid_services = OpenIDServiceEndpoint.fromHTML(yadis_url, body)
 return (yadis_url, getOPOrUserServices(openid_services))

def discoverYadis ( uri ) : response = yadisDiscover ( uri ) yadis_url = response . normalized_uri body = response . response_text try : openid_services = OpenIDServiceEndpoint . fromXRDS ( yadis_url , body ) except XRDSError : openid_services = [ ] if ( not openid_services ) : if response . isXRDS ( ) : return discoverNoYadis ( uri ) openid_services = OpenIDServiceEndpoint . fromHTML ( yadis_url , body ) return ( yadis_url , getOPOrUserServices ( openid_services ) )
discover openid services for a uri .