]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Use empty torrc file when launching tor in test_rebind.py
authorrl1987 <rl1987@sdf.lonestar.org>
Wed, 13 Mar 2019 15:53:51 +0000 (17:53 +0200)
committerteor <teor@torproject.org>
Wed, 10 Apr 2019 08:45:21 +0000 (18:45 +1000)
src/test/test_rebind.py

index 00e5a08be71d56b3278806a53731c8f42741a1c2..4c41e1f437879f4db6237cf59d7a46e129677b3f 100644 (file)
@@ -82,13 +82,17 @@ if not os.path.exists(sys.argv[2]):
 tor_path = sys.argv[1]
 data_dir = sys.argv[2]
 
+empty_torrc_path = os.path.join(data_dir, 'empty_torrc')
+open(empty_torrc_path, 'w').close()
+
 tor_process = subprocess.Popen([tor_path,
                                '-DataDirectory', data_dir,
                                '-ControlPort', '127.0.0.1:{}'.format(control_port),
                                '-SOCKSPort', '127.0.0.1:{}'.format(socks_port),
                                '-Log', 'debug stdout',
                                '-LogTimeGranularity', '1',
-                               '-FetchServerDescriptors', '0'],
+                               '-FetchServerDescriptors', '0',
+                               '-f', empty_torrc_path],
                                stdout=subprocess.PIPE,
                                stderr=subprocess.PIPE)