Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mcg1969 committed Oct 5, 2024
1 parent d9dae5a commit b99621d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ae5_tools/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ def _response_hook(resp, *args, **kwargs):
prefix = req.method.upper()
if url == last_redirect:
prefix = "-> " + prefix
print(prefix, re.sub('[?].*', '?...', url), code, file=sys.stderr)
last_redirect = resp.headers['location'] if 300 <= code < 400 else None
print(prefix, re.sub("[?].*", "?...", url), code, file=sys.stderr)
last_redirect = resp.headers["location"] if 300 <= code < 400 else None


class EmptyRecordList(list):
Expand Down Expand Up @@ -352,7 +352,7 @@ def _build_requests_session() -> Session:
session.mount(prefix="https://", adapter=adapter)

if get_env_var(name="API_DEBUG"):
session.hooks['response'].append(_response_hook)
session.hooks["response"].append(_response_hook)

return session

Expand Down

0 comments on commit b99621d

Please sign in to comment.