cosmetic changes to frontend commands
This commit is contained in:
		
							parent
							
								
									315d7c5614
								
							
						
					
					
						commit
						3456d36039
					
				| 
						 | 
					@ -17,4 +17,3 @@ def receive_text(so):
 | 
				
			||||||
        return 1
 | 
					        return 1
 | 
				
			||||||
    them_d = json.loads(them_bytes.decode("utf-8"))
 | 
					    them_d = json.loads(them_bytes.decode("utf-8"))
 | 
				
			||||||
    print(them_d["message"])
 | 
					    print(them_d["message"])
 | 
				
			||||||
    print("elapsed time: %.2f" % (time.time() - start))
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -26,9 +26,9 @@ def send_file(so):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    i = Initiator(APPID, data)
 | 
					    i = Initiator(APPID, data)
 | 
				
			||||||
    code = i.get_code()
 | 
					    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("Wormhole code is '%s'" % code)
 | 
				
			||||||
    print("")
 | 
					    print()
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
        them_bytes = i.get_data()
 | 
					        them_bytes = i.get_data()
 | 
				
			||||||
    except WrongPasswordError as e:
 | 
					    except WrongPasswordError as e:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11,7 +11,7 @@ def send_text(so):
 | 
				
			||||||
                       }).encode("utf-8")
 | 
					                       }).encode("utf-8")
 | 
				
			||||||
    i = Initiator(APPID, data)
 | 
					    i = Initiator(APPID, data)
 | 
				
			||||||
    code = i.get_code()
 | 
					    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("Wormhole code is: %s" % code)
 | 
				
			||||||
    print("")
 | 
					    print("")
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
| 
						 | 
					@ -20,4 +20,8 @@ def send_text(so):
 | 
				
			||||||
        print("ERROR: " + e.explain(), file=sys.stderr)
 | 
					        print("ERROR: " + e.explain(), file=sys.stderr)
 | 
				
			||||||
        return 1
 | 
					        return 1
 | 
				
			||||||
    them_d = json.loads(them_bytes.decode("utf-8"))
 | 
					    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,))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user