From 3ce02de2b36b3c5fa932501ae3893e767eb47054 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl>
Date: Tue, 29 Jun 2021 20:42:09 +0200
Subject: [PATCH] 2.17.11

---
 CHANGELOG.md                                             | 1 +
 satella/__init__.py                                      | 2 +-
 satella/instrumentation/metrics/structures/cache_dict.py | 3 ++-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8a58f0d6..58d5f8b9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,3 +7,4 @@
 * added `grace_amount` to `ExponentialBackoff`
 * **bugfix**: `ExponentialBackoff` will start
     available
+* fixed a bug in `evictions`
diff --git a/satella/__init__.py b/satella/__init__.py
index ef462e13..ec6edf73 100644
--- a/satella/__init__.py
+++ b/satella/__init__.py
@@ -1 +1 @@
-__version__ = '2.17.11a4'
+__version__ = '2.17.11'
diff --git a/satella/instrumentation/metrics/structures/cache_dict.py b/satella/instrumentation/metrics/structures/cache_dict.py
index e17f9992..f1b1d468 100644
--- a/satella/instrumentation/metrics/structures/cache_dict.py
+++ b/satella/instrumentation/metrics/structures/cache_dict.py
@@ -110,7 +110,8 @@ class MetrifiedLRUCacheDict(LRUCacheDict[K, V]):
         self.how_long_refresh_takes = how_long_refresh_takes
 
     def evict(self):
-        self.evictions.runtime(+1)
+        if self.evictions is not None:
+            self.evictions.runtime(+1)
         super().evict()
 
     def __getitem__(self, item):
-- 
GitLab