[tor-commits] [torflow/master] Return code should be positive, see sys.exit()

mikeperry at torproject.org mikeperry at torproject.org
Fri Jun 24 19:33:54 UTC 2011


commit f4346a667801d7dee3c602cf02fe419ed1693031
Author: aagbsn <aagbsn at extc.org>
Date:   Sat Jun 18 16:04:39 2011 -0700

    Return code should be positive, see sys.exit()
---
 NetworkScanners/BwAuthority/bwauthority.py       |    2 +-
 NetworkScanners/BwAuthority/bwauthority_child.py |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/NetworkScanners/BwAuthority/bwauthority.py b/NetworkScanners/BwAuthority/bwauthority.py
index 62f0658..12eeab0 100755
--- a/NetworkScanners/BwAuthority/bwauthority.py
+++ b/NetworkScanners/BwAuthority/bwauthority.py
@@ -10,7 +10,7 @@ from signal import signal, SIGTERM
 
 # exit code to indicate scan completion
 # make sure to update this in bwauthority_child.py as well
-STOP_PCT_REACHED = -9
+STOP_PCT_REACHED = 9
 
 def main(argv):
   slice_num = 0 
diff --git a/NetworkScanners/BwAuthority/bwauthority_child.py b/NetworkScanners/BwAuthority/bwauthority_child.py
index 4b09f9f..e8a0a68 100755
--- a/NetworkScanners/BwAuthority/bwauthority_child.py
+++ b/NetworkScanners/BwAuthority/bwauthority_child.py
@@ -76,7 +76,7 @@ __selmgr = PathSupport.SelectionManager(
 
 # exit code to indicate scan completion
 # make sure to update this in bwauthority.py as well
-STOP_PCT_REACHED = -9
+STOP_PCT_REACHED = 9
 
 def read_config(filename):
   config = ConfigParser.SafeConfigParser()
@@ -309,6 +309,7 @@ def main(argv):
         plog('INFO', 'stop_pct: %s reached. Exiting with %s' % (stop_pct, STOP_PCT_REACHED))
         sys.exit(STOP_PCT_REACHED)
 
+    plog("DEBUG", "Starting slice number %s" % slice_num)
     speedrace(hdlr, slice_num*pct_step + start_pct, (slice_num + 1)*pct_step + start_pct, circs_per_node, save_every, out_dir,
               max_fetch_time, sleep_start, sleep_stop, slice_num,
               min_streams, sql_file)





More information about the tor-commits mailing list