diff options
Diffstat (limited to 'cachetools/ttl.py')
-rw-r--r-- | cachetools/ttl.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/cachetools/ttl.py b/cachetools/ttl.py index 7822e8b..528a085 100644 --- a/cachetools/ttl.py +++ b/cachetools/ttl.py @@ -198,8 +198,7 @@ class TTLCache(Cache): try: key = next(iter(self.__links)) except StopIteration: - msg = '%s is empty' % self.__class__.__name__ - raise KeyError(msg) from None + raise KeyError('%s is empty' % type(self).__name__) from None else: return (key, self.pop(key)) |