From c218b939c08752a5e9d82ab8a9a86b4b3e23a487 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Tue, 24 May 2016 16:25:12 -0700 Subject: [PATCH] move wormhole.twisted.tor_manager up to wormhole/ --- src/wormhole/cli/cmd_receive.py | 2 +- src/wormhole/cli/cmd_send.py | 2 +- src/wormhole/{twisted => }/tor_manager.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) rename src/wormhole/{twisted => }/tor_manager.py (98%) diff --git a/src/wormhole/cli/cmd_receive.py b/src/wormhole/cli/cmd_receive.py index f4c19f9..e7fa2ab 100644 --- a/src/wormhole/cli/cmd_receive.py +++ b/src/wormhole/cli/cmd_receive.py @@ -38,7 +38,7 @@ class TwistedReceiver: tor_manager = None if self.args.tor: 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) # For now, block everything until Tor has started. Soon: launch # tor in parallel with everything else, make sure the TorManager diff --git a/src/wormhole/cli/cmd_send.py b/src/wormhole/cli/cmd_send.py index ff32ed0..e393a0d 100644 --- a/src/wormhole/cli/cmd_send.py +++ b/src/wormhole/cli/cmd_send.py @@ -41,7 +41,7 @@ def send(args, reactor=reactor): tor_manager = None if args.tor: 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) # For now, block everything until Tor has started. Soon: launch tor # in parallel with everything else, make sure the TorManager can diff --git a/src/wormhole/twisted/tor_manager.py b/src/wormhole/tor_manager.py similarity index 98% rename from src/wormhole/twisted/tor_manager.py rename to src/wormhole/tor_manager.py index e6cc3de..4e96284 100644 --- a/src/wormhole/twisted/tor_manager.py +++ b/src/wormhole/tor_manager.py @@ -4,8 +4,8 @@ from twisted.internet.defer import inlineCallbacks, returnValue from twisted.internet.error import ConnectError import txtorcon import ipaddr -from ..timing import DebugTiming -from ..transit import allocate_tcp_port +from .timing import DebugTiming +from .transit import allocate_tcp_port class TorManager: def __init__(self, reactor, tor_socks_port=None, tor_control_port=9051,