[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [bridgedb/master] Fix an iter-over-null-value bug in Dist.IPBasedDistributor class.
commit 328caedefcd701c4280ebae79bd3a5fc8a8c6109
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
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 = []
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits