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

[tor-commits] [torflow/master] Create scan-data directories if they do not exist.



commit 666689ad18d358d764a35d041a7b16adb8d3287c
Author: aagbsn <aagbsn@xxxxxxxx>
Date:   Thu Nov 6 17:19:32 2014 +0000

    Create scan-data directories if they do not exist.
    
    Fixes #13663.
    
    Thanks to micah for reporting this issue.
---
 NetworkScanners/BwAuthority/bwauthority_child.py |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/NetworkScanners/BwAuthority/bwauthority_child.py b/NetworkScanners/BwAuthority/bwauthority_child.py
index 28b89c2..e8d2c19 100755
--- a/NetworkScanners/BwAuthority/bwauthority_child.py
+++ b/NetworkScanners/BwAuthority/bwauthority_child.py
@@ -296,6 +296,11 @@ def main(argv):
   (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) = read_config(argv[1])
+
+  # make sure necessary out_dir directory exists
+  path = os.getcwd()+'/'+out_dir
+  if not os.path.exists(path):
+    os.makedirs(path)
  
   if pid_file_name:
     pidfd = file(pid_file_name, 'w')

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits