[Python-checkins] r88926 - tracker/instances/python-dev/extensions/openid_login.py
martin.v.loewis
python-checkins at python.org
Sun Nov 27 23:42:26 CET 2011
Author: martin.v.loewis
Date: Sun Nov 27 23:42:26 2011
New Revision: 88926
Log:
Catch failed discovery of builtin providers.
Modified:
tracker/instances/python-dev/extensions/openid_login.py
Modified: tracker/instances/python-dev/extensions/openid_login.py
==============================================================================
--- tracker/instances/python-dev/extensions/openid_login.py (original)
+++ tracker/instances/python-dev/extensions/openid_login.py Sun Nov 27 23:42:26 2011
@@ -161,7 +161,10 @@
# results. However, the risk of login breaking if a provider does change
# its service URL outweighs the cost of another HTTP request to perform
# the discovery during login.
- services, op_endpoint, op_local = openid2rp.discover(provider_id)
+ result = openid2rp.discover(provider_id)
+ if result is None:
+ self.client.error_message.append('Provider %s appears to be down' % providers[provider][0])
+ services, op_endpoint, op_local = result
session = self.get_session(op_endpoint, services)
try:
session = self.get_session(op_endpoint, services)
More information about the Python-checkins
mailing list