Skip to content

Commit

Permalink
Fix interval check and error message formatting in multi.py
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvan2006 committed Feb 2, 2025
1 parent 0da7549 commit 27868a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions yfinance/multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def download(tickers, start=None, end=None, actions=False, threads=True,

if ignore_tz is None:
# Set default value depending on interval
if interval[1:] in ['m', 'h']:
if interval[-1] in ['m', 'h']:
# Intraday
ignore_tz = False
else:
Expand Down Expand Up @@ -185,7 +185,7 @@ def download(tickers, start=None, end=None, actions=False, threads=True,
errors = {}
for ticker in shared._ERRORS:
err = shared._ERRORS[ticker]
err = err.replace(f'{ticker}', '%ticker%')
err = err.replace(f'${ticker}: ', '')
if err not in errors:
errors[err] = [ticker]
else:
Expand All @@ -197,7 +197,7 @@ def download(tickers, start=None, end=None, actions=False, threads=True,
tbs = {}
for ticker in shared._TRACEBACKS:
tb = shared._TRACEBACKS[ticker]
tb = tb.replace(f'{ticker}', '%ticker%')
tb = tb.replace(f'${ticker}: ', '')
if tb not in tbs:
tbs[tb] = [ticker]
else:
Expand Down

0 comments on commit 27868a4

Please sign in to comment.