cmd: remove _twisted suffix from function names
No longer necessary now that all commands are twisted-based.
This commit is contained in:
parent
b0da2a9ac7
commit
4eaf88d7d2
|
@ -13,7 +13,7 @@ class RespondError(Exception):
|
|||
def __init__(self, response):
|
||||
self.response = response
|
||||
|
||||
def receive_twisted(args, reactor=reactor):
|
||||
def receive(args, reactor=reactor):
|
||||
return TwistedReceiver(args, reactor).go()
|
||||
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ from ..twisted.transit import TransitSender
|
|||
APPID = u"lothar.com/wormhole/text-or-file-xfer"
|
||||
|
||||
@inlineCallbacks
|
||||
def send_twisted(args, reactor=reactor):
|
||||
def send(args, reactor=reactor):
|
||||
assert isinstance(args.relay_url, type(u""))
|
||||
if args.zeromode:
|
||||
assert not args.code
|
||||
|
|
|
@ -9,12 +9,12 @@ from .cli_args import parser
|
|||
def dispatch(args): # returns Deferred
|
||||
if args.func == "send/send":
|
||||
from . import cmd_send
|
||||
return cmd_send.send_twisted(args)
|
||||
return cmd_send.send(args)
|
||||
if args.func == "receive/receive":
|
||||
_start = args.timing.add_event("import c_r_t")
|
||||
from . import cmd_receive
|
||||
args.timing.finish_event(_start)
|
||||
return cmd_receive.receive_twisted(args)
|
||||
return cmd_receive.receive(args)
|
||||
|
||||
raise ValueError("unknown args.func %s" % args.func)
|
||||
|
||||
|
|
|
@ -326,8 +326,8 @@ class PregeneratedCode(ServerBase, ScriptsBase, unittest.TestCase):
|
|||
rargs.stdout = io.StringIO()
|
||||
rargs.stderr = io.StringIO()
|
||||
rargs.timing = DebugTiming()
|
||||
send_d = cmd_send.send_twisted(sargs)
|
||||
receive_d = cmd_receive.receive_twisted(rargs)
|
||||
send_d = cmd_send.send(sargs)
|
||||
receive_d = cmd_receive.receive(rargs)
|
||||
|
||||
# The sender might fail, leaving the receiver hanging, or vice
|
||||
# versa. If either side fails, cancel the other, so it won't
|
||||
|
|
Loading…
Reference in New Issue
Block a user