Commits

Anonymous committed 786b417

Catch discovery errors.

Comments (0)

Files changed (1)

extensions/openid_login.py

         # 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