Skip to content

Commit ff314af

Browse files
committed
updated get_info to use quotetype to determine presence net Expense Ratio (net)
1 parent 2fd1349 commit ff314af

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

yfinance/base.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1751,12 +1751,10 @@ def get_mutualfund_holders(self, proxy=None, as_dict=False):
17511751
def get_info(self, proxy=None) -> dict:
17521752
self._quote.proxy = proxy or self.proxy
17531753
data = self._quote.info
1754-
try:
1754+
if data['quoteType'] == 'ETF':
17551755
holders = self.get_institutional_holders()
17561756
expenseRatio = holders[holders[0] == 'Expense Ratio (net)'][1].values[0]
17571757
data['annualNetExpenseRatio'] = expenseRatio
1758-
except Exception:
1759-
pass
17601758
return data
17611759

17621760
def get_fast_info(self, proxy=None):

0 commit comments

Comments
 (0)