commit 40c5d11015ef2a8dab4bef93b8a256538059e0e4 Author: aagbsn aagbsn@extc.org Date: Fri Jun 17 18:48:42 2011 -0700
pruned unused code --- NetworkScanners/BwAuthority/bwauthority.py | 17 +++++------------ NetworkScanners/BwAuthority/bwauthority_child.py | 1 + 2 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/NetworkScanners/BwAuthority/bwauthority.py b/NetworkScanners/BwAuthority/bwauthority.py index ad53663..cee2044 100644 --- a/NetworkScanners/BwAuthority/bwauthority.py +++ b/NetworkScanners/BwAuthority/bwauthority.py @@ -7,20 +7,13 @@ import traceback sys.path.append("../../") from TorCtl import TorUtil from TorCtl.TorUtil import plog -import bwauthority_child
-def main(argv): - TorUtil.read_config(argv[1]) - (start_pct,stop_pct,nodes_per_slice,save_every,circs_per_node,out_dir, - max_fetch_time,tor_dir,sleep_start,sleep_stop, - min_streams,pid_file_name,db_url) = bwauthority_child.read_config(argv[1]) - - if pid_file_name: - pidfd = file(pid_file_name, 'w') - pidfd.write('%d\n' % os.getpid()) - pidfd.close() +# exit code to indicate scan completion +# make sure to update this in bwauthority_child.py as well +STOP_PCT_REACHED = -9
+def main(argv): slice_num = 0 while True: plog('INFO', 'Beginning time loop') @@ -29,7 +22,7 @@ def main(argv): p.wait() if (p.returncode == 0): slice_num += 1 - elif (p.returncode == bwauthority_child.STOP_PCT_REACHED): + elif (p.returncode == STOP_PCT_REACHED): plog('INFO', 'restarting from slice 0') slice_num = 0 else: diff --git a/NetworkScanners/BwAuthority/bwauthority_child.py b/NetworkScanners/BwAuthority/bwauthority_child.py index 0de7998..4b09f9f 100755 --- a/NetworkScanners/BwAuthority/bwauthority_child.py +++ b/NetworkScanners/BwAuthority/bwauthority_child.py @@ -75,6 +75,7 @@ __selmgr = PathSupport.SelectionManager( exit_ports=[443])
# exit code to indicate scan completion +# make sure to update this in bwauthority.py as well STOP_PCT_REACHED = -9
def read_config(filename):
tor-commits@lists.torproject.org