diff --git a/src/wormhole/scripts/cmd_receive.py b/src/wormhole/scripts/cmd_receive_blocking.py similarity index 99% rename from src/wormhole/scripts/cmd_receive.py rename to src/wormhole/scripts/cmd_receive_blocking.py index caab1cb..0273ce5 100644 --- a/src/wormhole/scripts/cmd_receive.py +++ b/src/wormhole/scripts/cmd_receive_blocking.py @@ -187,7 +187,7 @@ def accept_directory(args, them_d, w): return 0 @handle_server_error -def receive(args): +def receive_blocking(args): # we're receiving text, or a file from ..blocking.transcribe import Wormhole, WrongPasswordError assert isinstance(args.relay_url, type(u"")) diff --git a/src/wormhole/scripts/runner.py b/src/wormhole/scripts/runner.py index 2c02169..999eff6 100644 --- a/src/wormhole/scripts/runner.py +++ b/src/wormhole/scripts/runner.py @@ -23,8 +23,8 @@ def dispatch(args): from . import cmd_send_blocking return cmd_send_blocking.send_blocking(args) if args.func == "receive/receive": - from . import cmd_receive - return cmd_receive.receive(args) + from . import cmd_receive_blocking + return cmd_receive_blocking.receive_blocking(args) raise ValueError("unknown args.func %s" % args.func) def run(args, cwd, stdout, stderr, executable=None): diff --git a/src/wormhole/test/test_scripts.py b/src/wormhole/test/test_scripts.py index da7d8b1..b930960 100644 --- a/src/wormhole/test/test_scripts.py +++ b/src/wormhole/test/test_scripts.py @@ -7,7 +7,8 @@ from twisted.internet.defer import inlineCallbacks from twisted.internet.threads import deferToThread from .. import __version__ from .common import ServerBase -from ..scripts import runner, cmd_send_blocking, cmd_send_twisted, cmd_receive +from ..scripts import (runner, cmd_send_blocking, cmd_send_twisted, + cmd_receive_blocking) from ..scripts.send_common import build_phase1_data from ..errors import TransferError @@ -302,7 +303,7 @@ class PregeneratedCode(ServerBase, ScriptsBase, unittest.TestCase): else: send_d = deferToThread(cmd_send_blocking.send_blocking, sargs) assert not receiver_twisted # not importable yet - receive_d = deferToThread(cmd_receive.receive, rargs) + receive_d = deferToThread(cmd_receive_blocking.receive_blocking, rargs) send_rc = yield send_d send_stdout = sargs.stdout.getvalue()