summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Halley <halley@dnspython.org>2020-05-23 14:27:04 -0700
committerBob Halley <halley@dnspython.org>2020-05-23 14:27:04 -0700
commit8bb39d33ff5bc834773ee8e83bc62c4daa9e4372 (patch)
tree0b7578dcfe806250462aafd87f6b4a881e1ab96e
parent9b641b5fbf5122ceb81f1f529b74793c3c9515f1 (diff)
downloaddnspython-8bb39d33ff5bc834773ee8e83bc62c4daa9e4372.tar.gz
clearly people do not delete from NameDicts very often
-rw-r--r--dns/namedict.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/dns/namedict.py b/dns/namedict.py
index 0e1103f..5807453 100644
--- a/dns/namedict.py
+++ b/dns/namedict.py
@@ -69,8 +69,8 @@ class NameDict(MutableMapping):
self.__update_max_depth(key)
def __delitem__(self, key):
- value = self.__store.pop(key)
- if len(value) == self.max_depth:
+ self.__store.pop(key)
+ if len(key) == self.max_depth:
self.max_depth_items = self.max_depth_items - 1
if self.max_depth_items == 0:
self.max_depth = 0