ib.api: return None on manual quote timeout

ib_py311_fixes
Tyler Goodlet 2023-08-30 14:56:11 -04:00
parent e54c3dc523
commit 778d26067d
1 changed files with 2 additions and 2 deletions

View File

@ -786,7 +786,7 @@ class Client:
timeout: float = 1, timeout: float = 1,
raise_on_timeout: bool = False, raise_on_timeout: bool = False,
) -> Ticker: ) -> Ticker | None:
''' '''
Return a single (snap) quote for symbol. Return a single (snap) quote for symbol.
@ -811,7 +811,7 @@ class Client:
except TimeoutError: except TimeoutError:
if raise_on_timeout: if raise_on_timeout:
raise raise
return tkr return None
if tkr: if tkr:
break break