update -0 and --text output too
This commit is contained in:
parent
9b1f99b994
commit
c7c7c0381c
|
@ -92,13 +92,13 @@ class Sender:
|
||||||
offer, self._fd_to_send = self._build_offer()
|
offer, self._fd_to_send = self._build_offer()
|
||||||
args = self._args
|
args = self._args
|
||||||
|
|
||||||
other_cmd = "wormhole receive"
|
other_cmd = u"wormhole receive"
|
||||||
if args.verify:
|
if args.verify:
|
||||||
other_cmd = "wormhole receive --verify"
|
other_cmd = u"wormhole receive --verify"
|
||||||
if args.zeromode:
|
if args.zeromode:
|
||||||
assert not args.code
|
assert not args.code
|
||||||
args.code = u"0-"
|
args.code = u"0-"
|
||||||
other_cmd += " -0"
|
other_cmd += u" -0"
|
||||||
|
|
||||||
if args.code:
|
if args.code:
|
||||||
w.set_code(args.code)
|
w.set_code(args.code)
|
||||||
|
@ -108,12 +108,13 @@ class Sender:
|
||||||
code = yield w.get_code()
|
code = yield w.get_code()
|
||||||
if not args.zeromode:
|
if not args.zeromode:
|
||||||
print(u"Wormhole code is: %s" % code, file=args.stderr)
|
print(u"Wormhole code is: %s" % code, file=args.stderr)
|
||||||
print(u"On the other computer, please run:", file=args.stderr)
|
other_cmd += u" " + code
|
||||||
print(u"", file=args.stderr)
|
print(u"On the other computer, please run:", file=args.stderr)
|
||||||
print(u"%s %s" % (other_cmd, code), file=args.stderr)
|
print(u"", file=args.stderr)
|
||||||
print(u"", file=args.stderr)
|
print(other_cmd, file=args.stderr)
|
||||||
# flush stderr so the code is displayed immediately
|
print(u"", file=args.stderr)
|
||||||
args.stderr.flush()
|
# flush stderr so the code is displayed immediately
|
||||||
|
args.stderr.flush()
|
||||||
|
|
||||||
# We don't print a "waiting" message for get_unverified_key() here,
|
# We don't print a "waiting" message for get_unverified_key() here,
|
||||||
# even though we do that in cmd_receive.py, because it's not at all
|
# even though we do that in cmd_receive.py, because it's not at all
|
||||||
|
|
|
@ -893,6 +893,10 @@ class ZeroMode(ServerBase, unittest.TestCase):
|
||||||
|
|
||||||
# check sender
|
# check sender
|
||||||
expected = ("Sending text message ({bytes:d} Bytes){NL}"
|
expected = ("Sending text message ({bytes:d} Bytes){NL}"
|
||||||
|
"On the other computer, please run:{NL}"
|
||||||
|
"{NL}"
|
||||||
|
"wormhole receive -0{NL}"
|
||||||
|
"{NL}"
|
||||||
"text message sent{NL}").format(bytes=len(message),
|
"text message sent{NL}").format(bytes=len(message),
|
||||||
code=send_cfg.code,
|
code=send_cfg.code,
|
||||||
NL=NL)
|
NL=NL)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user