Skip to content

Commit

Permalink
feat: allow reset of proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
alandtse committed Feb 25, 2021
1 parent 4b41e12 commit 2218c57
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions teslajsonpy/teslaproxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,14 @@ async def prepend_relative_urls(self, base_url: URL, html: Text) -> Text:
html=html,
)

async def reset_data(self) -> None:
"""Reset all stored data.
A proxy may need to service multiple login requests if the route is not torn down. This function will reset all data between logins.
"""
self.waf_retry = 0
await super().reset_data()

async def prepend_i18n_path(self, base_url: URL, html: Text) -> Text:
"""Prepend path for i18n loadPath so it'll reach the proxy.
Expand Down

0 comments on commit 2218c57

Please sign in to comment.