[or-cvs] [torflow/master 71/92] Handle case where select_exit_from_set(common_nodes) returns None
mikeperry at torproject.org
mikeperry at torproject.org
Sat Aug 21 05:14:01 UTC 2010
Author: John M. Schanck <john at anomos.info>
Date: Thu, 12 Aug 2010 17:32:42 -0400
Subject: Handle case where select_exit_from_set(common_nodes) returns None
Commit: f6fbccac8e83f8884741bb0ec533971be0edd148
---
NetworkScanners/ExitAuthority/soat.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/NetworkScanners/ExitAuthority/soat.py b/NetworkScanners/ExitAuthority/soat.py
index 1af5856..d4e5dc8 100755
--- a/NetworkScanners/ExitAuthority/soat.py
+++ b/NetworkScanners/ExitAuthority/soat.py
@@ -3104,10 +3104,12 @@ def main(argv):
common_nodes &= test.nodes
scanhdlr._sanity_check(map(lambda id: test.node_map[id],
test.nodes))
+ if common_nodes is None:
+ common_nodes = set([])
- any_avail = bool(common_nodes)
+ current_exit_idhex = scanhdlr.select_exit_from_set(common_nodes)
+ any_avail = bool(current_exit_idhex is not None)
if any_avail:
- current_exit_idhex = scanhdlr.select_exit_from_set(common_nodes)
plog("DEBUG", "Chose to run "+str(n_tests)+" tests via "+str(current_exit_idhex)+" (tests share "+str(len(common_nodes))+" exit nodes)")
for test in to_run:
result = test.run_test()
--
1.7.1
More information about the tor-commits
mailing list