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

Commit 349a53f

Browse files
committed
cleanup unuse code
1 parent d547d89 commit 349a53f

2 files changed

Lines changed: 1 addition & 23 deletions

File tree

bwscanner/attacher.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,6 @@
66
from bwscanner.logger import log
77

88

9-
class StreamClosedListener(StreamListenerMixin):
10-
"""
11-
Closes the contained circuit if the listened stream closes.
12-
13-
This StreamListener is used to instruct Tor to close circuits
14-
immediately after a stream completes rather than wait for the
15-
circuit to time out.
16-
"""
17-
def __init__(self, circ):
18-
self.circ = circ
19-
20-
def stream_closed(self, *args, **kw):
21-
self.circ.close(ifUnused=True)
22-
23-
249
def options_need_new_consensus(tor_config, new_options):
2510
"""
2611
Check if we need to wait for a new consensus after updating

bwscanner/measurement.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from bwscanner.logger import log
99
from bwscanner.circuit import TwoHop
10-
from bwscanner.fetcher import get_tor_socks_endpoint, hashingReadBody, fetch
10+
from bwscanner.fetcher import hashingReadBody, fetch
1111
from bwscanner.writer import ResultSink
1212

1313
# defer.setDebugging(True)
@@ -193,10 +193,3 @@ def get_r_desc_bw(self, router):
193193
defer.returnValue((server_descriptor.average_bandwidth,
194194
server_descriptor.burst_bandwidth,
195195
server_descriptor.observed_bandwidth))
196-
197-
@property
198-
@defer.inlineCallbacks
199-
def socks(self):
200-
if self._socks is None:
201-
self._socks = yield get_tor_socks_endpoint(self.state)
202-
defer.returnValue(self._socks)

0 commit comments

Comments
 (0)