diff --git a/bob.py b/bob.py index a5196cc..a9d2851 100644 --- a/bob.py +++ b/bob.py @@ -2,7 +2,6 @@ import argparse import socket from otp import bob from net import send, send_point, recv, recv_point -import contextlib import sys def main(): @@ -15,11 +14,10 @@ def main(): with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as alice: alice.connect((args.ip, args.port)) - with contextlib.suppress(StopIteration): - b = bob(args.c > 0) - b.send(None) - send_point(alice, b.send(recv_point(alice))) - response = b.send(recv(alice)) + b = bob(args.c > 0) + b.send(None) + send_point(alice, b.send(recv_point(alice))) + response = b.send(recv(alice)) sys.stdout.buffer.write(response) if __name__ == "__main__":