silent failure when scan-data directories don't exist
I ran the bwauthority scripts for several days and watched it pull files and write to log files and wonder why the aggregation wasn't getting any nodes at all.
Eventually, tired of waiting with no clue, I took a dive into the code and found that it was wanting to write to the out_dir configured directory in each scanner.*/bwauthority.cfg, and I didn't have that directory. I'm surprised that things just kept going without an error, but I was more surprised that this wasn't handled in the code.
I think something like the following would be a trivial change to make this not be a problem for people in the future:
diff --git a/NetworkScanners/BwAuthority/bwauthority_child.py b/NetworkScanners/BwAuthority/bwauthority_child.py index 28b89c2..296662a 100755 --- a/NetworkScanners/BwAuthority/bwauthority_child.py +++ b/NetworkScanners/BwAuthority/bwauthority_child.py # Do NOT modify this object directly after it is handed to PathBuilder @@ -210,6 +210,12 @@ def speedrace(hdlr, start_pct, stop_pct, circs_per_node, save_every, out_dir, attempt = 0 successful = 0 + + # make sure necessary out_dir directory exists + dir = os.getcwd()+'/'+out_dir + if not os.path.exists(dir): + os.makedirs(dir) + while True: if hdlr.is_count_met(circs_per_node, successful): break hdlr.wait_for_consensus()