From ddc2c8975ace90f5d6ac3191c553acd7dc227c17 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 19 May 2021 08:47:28 -0400 Subject: [PATCH] Ignore whitespace patterns in ib search --- piker/brokers/ib.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/piker/brokers/ib.py b/piker/brokers/ib.py index 289d0583..d4377f7c 100644 --- a/piker/brokers/ib.py +++ b/piker/brokers/ib.py @@ -1286,13 +1286,12 @@ async def open_symbol_search( await trio.sleep(diff) try: pattern = stream.receive_nowait() - # if new: - # pattern = new except trio.WouldBlock: pass - if not pattern: + if not pattern or pattern.isspace(): log.warning('empty pattern received, skipping..') + await stream.send(matches) continue log.debug(f'searching for {pattern}')