From bd718524272124732359c584d33093c1635cb97c Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Thu, 8 Mar 2018 18:18:52 +0000 Subject: [PATCH] sync_struct: Tweak variable name to avoid confusion with `init` mod action [nfc] --- artiq/protocols/sync_struct.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/artiq/protocols/sync_struct.py b/artiq/protocols/sync_struct.py index 1095e45ef..ee1c0a75c 100644 --- a/artiq/protocols/sync_struct.py +++ b/artiq/protocols/sync_struct.py @@ -19,7 +19,7 @@ from artiq.protocols import pyon from artiq.protocols.asyncio_server import AsyncioServer -_init_string = b"ARTIQ sync_struct\n" +_protocol_banner = b"ARTIQ sync_struct\n" def process_mod(target, mod): @@ -71,7 +71,7 @@ class Subscriber: try: if before_receive_cb is not None: before_receive_cb() - self.writer.write(_init_string) + self.writer.write(_protocol_banner) self.writer.write((self.notifier_name + "\n").encode()) self.receive_task = asyncio.ensure_future(self._receive_cr()) except: @@ -217,7 +217,7 @@ class Publisher(AsyncioServer): async def _handle_connection_cr(self, reader, writer): try: line = await reader.readline() - if line != _init_string: + if line != _protocol_banner: return line = await reader.readline()