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

Commit

Permalink
Fix slash in previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
juga0 committed Mar 24, 2018
1 parent 6563764 commit e831fde
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion bwscanner/measurement.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ def __init__(self, state, clock, measurement_dir, **kwargs):
self.tasks = []
self.circuits = None
self.baseurl = kwargs.get('baseurl')
# test does not use baseurl
if self.baseurl is not None:
assert self.baseurl.endswith('/')
self.bw_files = kwargs.get('bw_files')
self.result_sink = ResultSink(self.measurement_dir, chunk_size=10)

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

def choose_url(self, path):
return self.baseurl + '/' + self.bw_files[self.choose_file_size(path)][0]
return self.baseurl + self.bw_files[self.choose_file_size(path)][0]

def run_scan(self):
all_done = defer.Deferred()
Expand Down
2 changes: 1 addition & 1 deletion test/test_measurement.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_scan_chutney(self):
# check that each run is producing the same input set!
self.tmp = mkdtemp()
scan = BwScan(self.tor_state, reactor, self.tmp)
scan.baseurl = 'http://127.0.0.1:{}'.format(self.port)
scan.baseurl = 'http://127.0.0.1:{}/'.format(self.port)
# FIXME: to simplify test, use same data and hash, no matter what the file size is
scan.bw_files = {
64*1024: ("64M", '86f7e437faa5a7fce15d1ddcb9eaeaea377667b8'),
Expand Down

0 comments on commit e831fde

Please sign in to comment.