]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
clearly people do not delete from NameDicts very often
authorBob Halley <halley@dnspython.org>
Sat, 23 May 2020 21:27:04 +0000 (14:27 -0700)
committerBob Halley <halley@dnspython.org>
Sat, 23 May 2020 21:27:04 +0000 (14:27 -0700)
dns/namedict.py

index 0e1103f7964a6f4861f9fe8a6c8d38fbd42747f4..580745307d34bd81b0fe14ab3d7a411450b72231 100644 (file)
@@ -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