Commits

Martin von Löwis committed ea07eb1

Fix exception for defaultdict.

Comments (0)

Files changed (1)

openid2rp/testapp.py

                     session, expire = sessions[url][-1]
                     if now > expire:
                         raise _Expired
-                except (KeyError, _Expired):
+                except (IndexError, _Expired):
                     try:
                         session = associate(services, url)
                     except ValueError, e:
                     session, expire = sessions[url][-1]
                     if now > expire:
                         raise _Expired
-                except (KeyError, _Expired):
+                except (IndexError, _Expired):
                     try:
                         session = associate(services, url)
                     except ValueError, e: