From e5bb2492c4f3488fdedcf93492e9d404b24170f5 Mon Sep 17 00:00:00 2001 From: Rick Wierenga Date: Wed, 18 Sep 2024 10:56:04 -0700 Subject: [PATCH] [star] don't log empty responses --- pylabrobot/liquid_handling/backends/hamilton/base.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pylabrobot/liquid_handling/backends/hamilton/base.py b/pylabrobot/liquid_handling/backends/hamilton/base.py index f6b6ea65ab..1b8da40c5a 100644 --- a/pylabrobot/liquid_handling/backends/hamilton/base.py +++ b/pylabrobot/liquid_handling/backends/hamilton/base.py @@ -294,14 +294,16 @@ def _continuously_read(self) -> None: except TimeoutError: continue - logger.info("Received response: %s", resp) + if resp == "": + continue + + logger.debug("Received response: %s", resp) # Parse response. try: response_id = self.get_id_from_fw_response(resp) except ValueError as e: - if resp != "": - logger.warning("Could not parse response: %s (%s)", resp, e) + logger.warning("Could not parse response: %s (%s)", resp, e) continue for id_, (loop, fut, cmd, timeout_time) in self._waiting_tasks.items():