diff options
| author | Marius Gedminas <marius@gedmin.as> | 2021-05-06 09:40:22 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-06 09:40:22 +0300 |
| commit | 066166880d88b59141c1f85cbb6b67ee36bc846f (patch) | |
| tree | 2e7121bf177a50ba48e6d0b9c64466aac5c1aed5 /requests_cache/session.py | |
| parent | 8935f4bce6011ee75ac821edd9f91f0f5a096f6b (diff) | |
| download | requests-cache-066166880d88b59141c1f85cbb6b67ee36bc846f.tar.gz | |
Remove spurious logger.exception()
The exception is re-raised, so logging an incomplete traceback at this point makes little sense to me. Either the caller will catch the exception and log it, or the caller wants the exception suppressed, in which case the incomplete traceback logged here will just confuse them.
Diffstat (limited to 'requests_cache/session.py')
| -rw-r--r-- | requests_cache/session.py | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/requests_cache/session.py b/requests_cache/session.py index 25af89c..b9f8cf8 100644 --- a/requests_cache/session.py +++ b/requests_cache/session.py @@ -152,7 +152,6 @@ class CacheMixin: return new_response # Return the expired/invalid response on error, if specified; otherwise reraise except Exception as e: - logger.exception(e) if self.old_data_on_error: logger.warning('Request failed; using stale cache data') return response |
