diff --git a/src/wormhole/scripts/cmd_receive_text.py b/src/wormhole/scripts/cmd_receive_text.py index 4c1601a..a1b1c29 100644 --- a/src/wormhole/scripts/cmd_receive_text.py +++ b/src/wormhole/scripts/cmd_receive_text.py @@ -17,4 +17,3 @@ def receive_text(so): return 1 them_d = json.loads(them_bytes.decode("utf-8")) print(them_d["message"]) - print("elapsed time: %.2f" % (time.time() - start)) diff --git a/src/wormhole/scripts/cmd_send_file.py b/src/wormhole/scripts/cmd_send_file.py index 09c4996..3d2a2b7 100644 --- a/src/wormhole/scripts/cmd_send_file.py +++ b/src/wormhole/scripts/cmd_send_file.py @@ -26,9 +26,9 @@ def send_file(so): i = Initiator(APPID, data) code = i.get_code() - print("On the other computer, please run: receive_file") + print("On the other computer, please run: wormhole receive-file") print("Wormhole code is '%s'" % code) - print("") + print() try: them_bytes = i.get_data() except WrongPasswordError as e: diff --git a/src/wormhole/scripts/cmd_send_text.py b/src/wormhole/scripts/cmd_send_text.py index 1943012..714ab85 100644 --- a/src/wormhole/scripts/cmd_send_text.py +++ b/src/wormhole/scripts/cmd_send_text.py @@ -11,7 +11,7 @@ def send_text(so): }).encode("utf-8") i = Initiator(APPID, data) code = i.get_code() - print("On the other computer, please run: receive_text") + print("On the other computer, please run: wormhole receive-text") print("Wormhole code is: %s" % code) print("") try: @@ -20,4 +20,8 @@ def send_text(so): print("ERROR: " + e.explain(), file=sys.stderr) return 1 them_d = json.loads(them_bytes.decode("utf-8")) - print("them: %r" % (them_d,)) + if them_d["message"] == "ok": + print("text sent") + else: + print("error sending text: %r" % (them_d,)) +