move wormhole.twisted.tor_manager up to wormhole/

This commit is contained in:
Brian Warner 2016-05-24 16:25:12 -07:00
parent 7140565b99
commit c218b939c0
3 changed files with 4 additions and 4 deletions

View File

@ -38,7 +38,7 @@ class TwistedReceiver:
tor_manager = None tor_manager = None
if self.args.tor: if self.args.tor:
with self.args.timing.add("import", which="tor_manager"): with self.args.timing.add("import", which="tor_manager"):
from ..twisted.tor_manager import TorManager from ..tor_manager import TorManager
tor_manager = TorManager(self._reactor, timing=self.args.timing) tor_manager = TorManager(self._reactor, timing=self.args.timing)
# For now, block everything until Tor has started. Soon: launch # For now, block everything until Tor has started. Soon: launch
# tor in parallel with everything else, make sure the TorManager # tor in parallel with everything else, make sure the TorManager

View File

@ -41,7 +41,7 @@ def send(args, reactor=reactor):
tor_manager = None tor_manager = None
if args.tor: if args.tor:
with args.timing.add("import", which="tor_manager"): with args.timing.add("import", which="tor_manager"):
from ..twisted.tor_manager import TorManager from ..tor_manager import TorManager
tor_manager = TorManager(reactor, timing=args.timing) tor_manager = TorManager(reactor, timing=args.timing)
# For now, block everything until Tor has started. Soon: launch tor # For now, block everything until Tor has started. Soon: launch tor
# in parallel with everything else, make sure the TorManager can # in parallel with everything else, make sure the TorManager can

View File

@ -4,8 +4,8 @@ from twisted.internet.defer import inlineCallbacks, returnValue
from twisted.internet.error import ConnectError from twisted.internet.error import ConnectError
import txtorcon import txtorcon
import ipaddr import ipaddr
from ..timing import DebugTiming from .timing import DebugTiming
from ..transit import allocate_tcp_port from .transit import allocate_tcp_port
class TorManager: class TorManager:
def __init__(self, reactor, tor_socks_port=None, tor_control_port=9051, def __init__(self, reactor, tor_socks_port=None, tor_control_port=9051,