From 778d26067d463ba52d685539ba20bb81cec68657 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 30 Aug 2023 14:56:11 -0400 Subject: [PATCH] ib.api: return None on manual quote timeout --- piker/brokers/ib/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/piker/brokers/ib/api.py b/piker/brokers/ib/api.py index bc4bdcf1..63c38bc8 100644 --- a/piker/brokers/ib/api.py +++ b/piker/brokers/ib/api.py @@ -786,7 +786,7 @@ class Client: timeout: float = 1, raise_on_timeout: bool = False, - ) -> Ticker: + ) -> Ticker | None: ''' Return a single (snap) quote for symbol. @@ -811,7 +811,7 @@ class Client: except TimeoutError: if raise_on_timeout: raise - return tkr + return None if tkr: break