From e24033bc9e33c1d0cd0bebbf92a3b70c05f23c18 Mon Sep 17 00:00:00 2001 From: Robert Bendun Date: Thu, 18 Apr 2024 00:30:25 +0200 Subject: [PATCH] we don't need contextlib here --- bob.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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__":