From dae0ad1ce6cc4d98831392273273b13a42cbaf51 Mon Sep 17 00:00:00 2001 From: Adrian Likins Date: Mon, 2 Oct 2017 13:53:39 -0400 Subject: [PATCH] Fix flush_cache on redis cache Fix a del on non existent self.cache. Fixes #31148 --- lib/ansible/plugins/cache/redis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/plugins/cache/redis.py b/lib/ansible/plugins/cache/redis.py index 831ff037e42..893e1e211f1 100644 --- a/lib/ansible/plugins/cache/redis.py +++ b/lib/ansible/plugins/cache/redis.py @@ -116,7 +116,7 @@ class CacheModule(BaseCacheModule): return (self._db.zrank(self._keys_set, key) is not None) def delete(self, key): - del self.cache[key] + del self._cache[key] self._db.delete(self._make_key(key)) self._db.zrem(self._keys_set, key)