py3: don't emit noisy b"" prefix for --verify

This commit is contained in:
Brian Warner 2015-09-28 16:59:15 -07:00
parent 429c5cd962
commit ccea1a7d3c
4 changed files with 4 additions and 4 deletions

View File

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

View File

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

View File

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

View File

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