Skip to content
This repository was archived by the owner on Mar 2, 2022. It is now read-only.

Commit e831fde

Browse files
committed
Fix slash in previous commit
1 parent 6563764 commit e831fde

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

bwscanner/measurement.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ def __init__(self, state, clock, measurement_dir, **kwargs):
4444
self.tasks = []
4545
self.circuits = None
4646
self.baseurl = kwargs.get('baseurl')
47+
# test does not use baseurl
48+
if self.baseurl is not None:
49+
assert self.baseurl.endswith('/')
4750
self.bw_files = kwargs.get('bw_files')
4851
self.result_sink = ResultSink(self.measurement_dir, chunk_size=10)
4952

@@ -64,7 +67,7 @@ def choose_file_size(self, path):
6467
return max(self.bw_files.keys())
6568

6669
def choose_url(self, path):
67-
return self.baseurl + '/' + self.bw_files[self.choose_file_size(path)][0]
70+
return self.baseurl + self.bw_files[self.choose_file_size(path)][0]
6871

6972
def run_scan(self):
7073
all_done = defer.Deferred()

test/test_measurement.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_scan_chutney(self):
4040
# check that each run is producing the same input set!
4141
self.tmp = mkdtemp()
4242
scan = BwScan(self.tor_state, reactor, self.tmp)
43-
scan.baseurl = 'http://127.0.0.1:{}'.format(self.port)
43+
scan.baseurl = 'http://127.0.0.1:{}/'.format(self.port)
4444
# FIXME: to simplify test, use same data and hash, no matter what the file size is
4545
scan.bw_files = {
4646
64*1024: ("64M", '86f7e437faa5a7fce15d1ddcb9eaeaea377667b8'),

0 commit comments

Comments
 (0)