forked from pool/python-cachey
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cachey?expand=0&rev=1
23 lines
602 B
Diff
23 lines
602 B
Diff
From 6d4aca78bdf846a4ab1d6755e58db3c671b4a3ea Mon Sep 17 00:00:00 2001
|
|
From: Dave Cole <david.cole@data61.csiro.au>
|
|
Date: Tue, 17 Jan 2017 14:42:53 +1100
|
|
Subject: [PATCH] Fix Cache.clear()
|
|
|
|
---
|
|
cachey/cache.py | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/cachey/cache.py b/cachey/cache.py
|
|
index b8ad6bd..17442a5 100644
|
|
--- a/cachey/cache.py
|
|
+++ b/cachey/cache.py
|
|
@@ -142,7 +142,7 @@ def __contains__(self, key):
|
|
return key in self.data
|
|
|
|
def clear(self):
|
|
- while self:
|
|
+ while self.data:
|
|
self._shrink_one()
|
|
|
|
def __nonzero__(self):
|