Skip to content

Commit

Permalink
fix: improve network exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
gmasse committed Jan 1, 2024
1 parent f561e61 commit 14351b3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions yf_stock_ticker/yf_stock_ticker.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@
def get_quotes(symbols):
""" Get quotes with yahooquery """

quotes = Ticker(symbols)

try:
quotes = Ticker(symbols)
data = quotes.price
except requests.exceptions.ConnectionError:
log.warning("Cannot get data")
Expand Down

0 comments on commit 14351b3

Please sign in to comment.