diff --git a/kademlia/__init__.py b/kademlia/__init__.py index 0b487a0..024305f 100644 --- a/kademlia/__init__.py +++ b/kademlia/__init__.py @@ -1,5 +1,5 @@ """ Kademlia is a Python implementation of the Kademlia protocol for `Twisted `_. """ -version_info = (0, 4) +version_info = (0, 5) version = '.'.join(map(str, version_info)) diff --git a/kademlia/node.py b/kademlia/node.py index 5f82c29..d1b25f7 100644 --- a/kademlia/node.py +++ b/kademlia/node.py @@ -94,7 +94,7 @@ class NodeHeap(object): nodes = [nodes] for node in nodes: - if node not in self: + if node not in self: distance = self.node.distanceTo(node) heapq.heappush(self.heap, (distance, node)) @@ -109,7 +109,7 @@ class NodeHeap(object): for distance, n in self.heap: if node.id == n.id: return True - return False + return False def getUncontacted(self): return [n for n in self if n.id not in self.contacted]