Skip to content
This repository has been archived by the owner on Jul 15, 2021. It is now read-only.

Commit

Permalink
Clear cookies when access to inventory API is denied
Browse files Browse the repository at this point in the history
  • Loading branch information
philippnormann committed Oct 26, 2020
1 parent 2fa8888 commit f438386
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sniper/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ async def main():
in_stock = status != 'PRODUCT_INVENTORY_OUT_OF_STOCK'
except PermissionError:
logging.error(
f'Access to inventory API was denied, trying again...')
f'Access to inventory API was denied, clearing cookies and trying again...')
api_client.session.cookie_jar.clear()
sleep(timeout)
except LookupError:
logging.error(
Expand Down

0 comments on commit f438386

Please sign in to comment.