From 0c60e281505d1cc46c1e497272454f2fa5a0688d Mon Sep 17 00:00:00 2001 From: Stuckinaboot Date: Sun, 3 Mar 2019 23:49:28 +1100 Subject: [PATCH] Fix linting issues --- tests/libp2p/test_notify.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/libp2p/test_notify.py b/tests/libp2p/test_notify.py index 80dd6c1..5ebed1b 100644 --- a/tests/libp2p/test_notify.py +++ b/tests/libp2p/test_notify.py @@ -49,14 +49,14 @@ async def perform_two_host_simple_set_up(): node_a = await new_node(transport_opt=["/ip4/127.0.0.1/tcp/0"]) node_b = await new_node(transport_opt=["/ip4/127.0.0.1/tcp/0"]) - async def stream_handler(stream): + async def my_stream_handler(stream): while True: read_string = (await stream.read()).decode() - response = "ack:" + read_string - await stream.write(response.encode()) + resp = "ack:" + read_string + await stream.write(resp.encode()) - node_b.set_stream_handler("/echo/1.0.0", stream_handler) + node_b.set_stream_handler("/echo/1.0.0", my_stream_handler) # Associate the peer with local ip address (see default parameters of Libp2p()) node_a.get_peerstore().add_addrs(node_b.get_id(), node_b.get_addrs(), 10)