]> git.mxchange.org Git - quix0rs-apt-p2p.git/blobdiff - ktable.py
fix bug in setting duplicate kv
[quix0rs-apt-p2p.git] / ktable.py
index 5bbe8d9209944ca73186c8720d1671d10bd40b70..c2e5f5c6e08a8fa56e8727fd1da1eadd568b55ad 100644 (file)
--- a/ktable.py
+++ b/ktable.py
@@ -145,9 +145,7 @@ class KTable:
            return
            
        # bucket is full, check to see if self.node is in the bucket
-       try:
-           me = self.buckets[i].min <= self.node < self.buckets[i].max
-       except ValueError:
+       if not (self.buckets[i].min <= self.node < self.buckets[i].max):
            return self.buckets[i].l[0]
        
        ## this bucket is full and contains our node, split the bucket