Skip to content

Commit

Permalink
Update aiohttp/cookiejar.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamsorcerer authored Nov 12, 2023
1 parent 0bd8c4a commit fd65674
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions aiohttp/cookiejar.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,11 @@ def filter_cookies(
SimpleCookie() if self._quote_cookie else BaseCookie()
)
if not self._cookies:
# Shortcut: empty jar
# We need the shortcut because the filtering itself and its
# preparation is expensive
# Skip do_expiration() if there are no cookies.
return filtered
self._do_expiration()
if not self._cookies:
# Shortcut: all cookies expired
# Likewise.
# Skip rest of function if no non-expired cookies.
return filtered

Check warning on line 254 in aiohttp/cookiejar.py

View check run for this annotation

Codecov / codecov/patch

aiohttp/cookiejar.py#L254

Added line #L254 was not covered by tests
hostname = request_url.raw_host or ""
request_origin = URL()
Expand Down

0 comments on commit fd65674

Please sign in to comment.