[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] [torflow/master 73/92] Removed unnecessary loop for checking if tests finished



Author: John M. Schanck <john@xxxxxxxxxxx>
Date: Sat, 14 Aug 2010 22:46:48 -0400
Subject: Removed unnecessary loop for checking if tests finished
Commit: 194ad0fb4504bbe0ed5367407995eeb2e55c347e

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

diff --git a/NetworkScanners/ExitAuthority/soat.py b/NetworkScanners/ExitAuthority/soat.py
index 72c4f1b..688ccc3 100755
--- a/NetworkScanners/ExitAuthority/soat.py
+++ b/NetworkScanners/ExitAuthority/soat.py
@@ -3137,20 +3137,21 @@ def main(argv):
           continue
 
     # Check each test for rewind
+    all_finished = True
     for test in tests.itervalues():
-      if test.finished():
+      if not test.finished():
+        all_finished = False
+      else:
         plog("NOTICE", test.proto+" test has finished all nodes.")
         datahandler.saveTest(test)
         test.remove_false_positives()
         if not do_rescan and rescan_at_finish:
           test.toggle_rescan()
           test.rewind()
+          all_finished = False
         elif restart_at_finish:
           test.rewind()
-    all_finished = True
-    for test in tests.itervalues():
-      if not test.finished():
-        all_finished = False
+          all_finished = False
     if all_finished:
       plog("NOTICE", "All tests have finished. Exiting\n")
       return
-- 
1.7.1