start on twisted receive: move old files into new homes
This commit is contained in:
parent
7f056ca075
commit
e6fba34570
|
@ -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""))
|
|
@ -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):
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user