summaryrefslogtreecommitdiff
path: root/src/saml2/mcache.py
diff options
context:
space:
mode:
authorIvan Kanakarakis <ivan.kanak@gmail.com>2019-12-04 17:01:35 +0200
committerIvan Kanakarakis <ivan.kanak@gmail.com>2019-12-17 15:16:41 +0200
commitda8b98cd309b6b52ea88feb4f31d810f5ce5c3b3 (patch)
tree70da4758bfd1f821aaecacd7709170a084a41682 /src/saml2/mcache.py
parentb727e210b8a29fb54c88d3d02a0388c41c08c8e8 (diff)
downloadpysaml2-da8b98cd309b6b52ea88feb4f31d810f5ce5c3b3.tar.gz
Fix exception name typo
Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com>
Diffstat (limited to 'src/saml2/mcache.py')
-rw-r--r--src/saml2/mcache.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/saml2/mcache.py b/src/saml2/mcache.py
index 0ead465f..ceace34d 100644
--- a/src/saml2/mcache.py
+++ b/src/saml2/mcache.py
@@ -3,7 +3,7 @@ import logging
import memcache
from saml2 import time_util
-from saml2.cache import ToOld, CacheError
+from saml2.cache import TooOld, CacheError
# The assumption is that any subject may consist of data
# gathered from several different sources, all with their own
@@ -56,7 +56,7 @@ class Cache(object):
subject_id+'_').items():
try:
info = self.get_info(item)
- except ToOld:
+ except TooOld:
oldees.append(entity_id)
continue
for key, vals in info["ava"].items():
@@ -77,10 +77,10 @@ class Cache(object):
try:
(timestamp, info) = item
except ValueError:
- raise ToOld()
+ raise TooOld()
if check_not_on_or_after and not time_util.not_on_or_after(timestamp):
- raise ToOld()
+ raise TooOld()
return info or None
@@ -170,7 +170,7 @@ class Cache(object):
try:
return time_util.not_on_or_after(timestamp)
- except ToOld:
+ except TooOld:
return False
def subjects(self):