From 89f04cf558d52f4f2d280d301aac9dc77f173e5a Mon Sep 17 00:00:00 2001 From: Brian Muller Date: Sat, 27 Jun 2015 15:11:55 -0400 Subject: [PATCH] bumped version to 0.5 --- kademlia/__init__.py | 2 +- kademlia/node.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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]