Skip to content

Commit

Permalink
Merge pull request #1258 from ranaroussi/r0.1/fix/info-not-caching
Browse files Browse the repository at this point in the history
Another info[] fix for #1256
  • Loading branch information
ValueRaider authored Dec 20, 2022
2 parents 338a94a + 882f8b3 commit 787b89c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions yfinance/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,10 @@ def _get_info(self, proxy=None):

self._sustainability = s[~s.index.isin(
['maxAge', 'ratingYear', 'ratingMonth'])]
else:
self._sustainability = utils.empty_df()
except Exception:
self._sustainability = utils.empty_df()
pass

# info (be nice to python 2)
Expand Down Expand Up @@ -515,6 +518,7 @@ def _get_info(self, proxy=None):
self._recommendations = rec[[
'Firm', 'To Grade', 'From Grade', 'Action']].sort_index()
except Exception:
self._recommendations = utils.empty_df()
pass

# Complementary key-statistics. For now just want 'trailing PEG ratio'
Expand Down

0 comments on commit 787b89c

Please sign in to comment.