[or-cvs] [torflow/master 30/92] Exit after all tests are done (for single exit scans)

mikeperry at torproject.org mikeperry at torproject.org
Sat Aug 21 05:13:59 UTC 2010


Author: John M. Schanck <john at anomos.info>
Date: Fri, 23 Jul 2010 01:51:41 -0400
Subject: Exit after all tests are done (for single exit scans)
Commit: d34c7bfdfe55924a7ebcfaa86842702691abe844

---
 NetworkScanners/ExitAuthority/soat.py |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/NetworkScanners/ExitAuthority/soat.py b/NetworkScanners/ExitAuthority/soat.py
index da091b5..5be9269 100755
--- a/NetworkScanners/ExitAuthority/soat.py
+++ b/NetworkScanners/ExitAuthority/soat.py
@@ -2993,11 +2993,15 @@ def main(argv):
       return
     plog("NOTICE", "Scanning only "+scan_exit)
     scanhdlr.new_exit()
-
-    while 1:
+    testsdone = 0
+    while testsdone < len(tests):
       for test in tests.values():
+        if test.finished():
+          testsdone += 1
+          continue
         result = test.run_test()
         plog("INFO", test.proto+" test via "+scan_exit+" has result "+str(result))
+    return
 
   # start testing
   while 1:
-- 
1.7.1




More information about the tor-commits mailing list