[Python-checkins] r88979 - tracker/instances/python-dev/extensions/openid_login.py
martin.v.loewis
python-checkins at python.org
Fri Jun 15 15:22:33 CEST 2012
Author: martin.v.loewis
Date: Fri Jun 15 15:22:32 2012
New Revision: 88979
Log:
Catch discovery errors.
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 Fri Jun 15 15:22:32 2012
@@ -160,7 +160,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.
- result = openid2rp.discover(provider_id)
+ try:
+ result = openid2rp.discover(provider_id)
+ except Exception:
+ result = None
if result is None:
self.client.error_message.append('Provider %s appears to be down' % providers[provider][0])
return
More information about the Python-checkins
mailing list