From ccea1a7d3c9dc0a2dee53f28e3cb508a6c59c41d Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Mon, 28 Sep 2015 16:59:15 -0700 Subject: [PATCH] py3: don't emit noisy b"" prefix for --verify --- src/wormhole/scripts/cmd_receive_file.py | 2 +- src/wormhole/scripts/cmd_receive_text.py | 2 +- src/wormhole/scripts/cmd_send_file.py | 2 +- src/wormhole/scripts/cmd_send_text.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wormhole/scripts/cmd_receive_file.py b/src/wormhole/scripts/cmd_receive_file.py index 904adf3..5914558 100644 --- a/src/wormhole/scripts/cmd_receive_file.py +++ b/src/wormhole/scripts/cmd_receive_file.py @@ -24,7 +24,7 @@ def receive_file(args): w.set_code(code) if args.verify: - verifier = binascii.hexlify(w.get_verifier()) + verifier = binascii.hexlify(w.get_verifier()).decode("ascii") print("Verifier %s." % verifier) mydata = json.dumps({ diff --git a/src/wormhole/scripts/cmd_receive_text.py b/src/wormhole/scripts/cmd_receive_text.py index 928ad61..68bee99 100644 --- a/src/wormhole/scripts/cmd_receive_text.py +++ b/src/wormhole/scripts/cmd_receive_text.py @@ -20,7 +20,7 @@ def receive_text(args): w.set_code(code) if args.verify: - verifier = binascii.hexlify(w.get_verifier()) + verifier = binascii.hexlify(w.get_verifier()).decode("ascii") print("Verifier %s." % verifier) data = json.dumps({"message": "ok"}).encode("utf-8") diff --git a/src/wormhole/scripts/cmd_send_file.py b/src/wormhole/scripts/cmd_send_file.py index 7fb9f1b..db419ec 100644 --- a/src/wormhole/scripts/cmd_send_file.py +++ b/src/wormhole/scripts/cmd_send_file.py @@ -35,7 +35,7 @@ def send_file(args): print() if args.verify: - verifier = binascii.hexlify(w.get_verifier()) + verifier = binascii.hexlify(w.get_verifier()).decode("ascii") while True: ok = six.moves.input("Verifier %s. ok? (yes/no): " % verifier) if ok.lower() == "yes": diff --git a/src/wormhole/scripts/cmd_send_text.py b/src/wormhole/scripts/cmd_send_text.py index 2a0ce4f..6ea25b0 100644 --- a/src/wormhole/scripts/cmd_send_text.py +++ b/src/wormhole/scripts/cmd_send_text.py @@ -29,7 +29,7 @@ def send_text(args): print("") if args.verify: - verifier = binascii.hexlify(w.get_verifier()) + verifier = binascii.hexlify(w.get_verifier()).decode("ascii") while True: ok = six.moves.input("Verifier %s. ok? (yes/no): " % verifier) if ok.lower() == "yes":