Skip to content

Commit

Permalink
Reduce logging output from data.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ValueRaider committed Nov 13, 2023
1 parent d4581c6 commit 30fe3b2
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions yfinance/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,13 @@ def _set_cookie_strategy(self, strategy, have_lock=False):
if not have_lock:
self._cookie_lock.release()

@utils.log_indent_decorator
def _save_session_cookies(self):
try:
cache.get_cookie_cache().store('csrf', self._session.cookies)
except Exception:
return False
return True

@utils.log_indent_decorator
def _load_session_cookies(self):
cookie_dict = cache.get_cookie_cache().lookup('csrf')
if cookie_dict is None:
Expand All @@ -137,14 +135,12 @@ def _load_session_cookies(self):
self._session.cookies.update(cookie_dict['cookie'])
utils.get_yf_logger().debug('loaded persistent cookie')

@utils.log_indent_decorator
def _save_cookie_basic(self, cookie):
try:
cache.get_cookie_cache().store('basic', cookie)
except Exception:
return False
return True
@utils.log_indent_decorator
def _load_cookie_basic(self):
cookie_dict = cache.get_cookie_cache().lookup('basic')
if cookie_dict is None:
Expand All @@ -155,7 +151,6 @@ def _load_cookie_basic(self):
utils.get_yf_logger().debug('loaded persistent cookie')
return cookie_dict['cookie']

@utils.log_indent_decorator
def _get_cookie_basic(self, proxy=None, timeout=30):
if self._cookie is not None:
utils.get_yf_logger().debug('reusing cookie')
Expand Down Expand Up @@ -185,7 +180,6 @@ def _get_cookie_basic(self, proxy=None, timeout=30):
utils.get_yf_logger().debug(f"fetched basic cookie = {self._cookie}")
return self._cookie

@utils.log_indent_decorator
def _get_crumb_basic(self, proxy=None, timeout=30):
if self._crumb is not None:
utils.get_yf_logger().debug('reusing crumb')
Expand Down Expand Up @@ -222,7 +216,6 @@ def _get_cookie_and_crumb_basic(self, proxy, timeout):
crumb = self._get_crumb_basic(proxy, timeout)
return cookie, crumb

@utils.log_indent_decorator
def _get_cookie_csrf(self, proxy, timeout):
if utils.reuse_cookie and self._cookie is not None:
utils.get_yf_logger().debug('reusing cookie')
Expand Down

0 comments on commit 30fe3b2

Please sign in to comment.