commit 328caedefcd701c4280ebae79bd3a5fc8a8c6109 Author: Isis Lovecruft isis@torproject.org Date: Fri Nov 22 00:32:14 2013 +0000
Fix an iter-over-null-value bug in Dist.IPBasedDistributor class.
In the initialisor of Dist.IPBasedDistributor, the `ipCatagories` and `answerParameters` both default to `None` and then they are immediately iterated over. --- lib/bridgedb/Dist.py | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/lib/bridgedb/Dist.py b/lib/bridgedb/Dist.py index f599e47..cd34dcb 100644 --- a/lib/bridgedb/Dist.py +++ b/lib/bridgedb/Dist.py @@ -89,6 +89,10 @@ class IPBasedDistributor(bridgedb.Bridges.BridgeHolder): self.nClusters = nClusters self.answerParameters = answerParameters
+ if not ipCategories: + ipCategories = [] + if not answerParameters: + answerParameters = [] self.rings = []
self.categories = []