cmd: remove _twisted suffix from function names

No longer necessary now that all commands are twisted-based.
This commit is contained in:
Brian Warner 2016-04-24 22:49:18 -07:00
parent b0da2a9ac7
commit 4eaf88d7d2
4 changed files with 6 additions and 6 deletions

View File

@ -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()

View File

@ -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

View File

@ -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)

View File

@ -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