Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:
- id: prettier

- repo: https://github.com/psf/black
rev: 21.9b0
rev: 22.3.0
hooks:
- id: black

Expand Down
8 changes: 4 additions & 4 deletions pyuhoo/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,18 @@ async def get_latest_data(self) -> None:
except UnauthorizedError:
self._log.debug(
"\033[93m"
+ "[get_latest_data] received 401 error, refreshing token and trying again"
+ "[get_latest_data] received 401 error, attempting to re-login and trying again"
+ "\033[0m"
)
await self.refresh_token()
await self.login()
data_latest = await self._api.data_latest()
except ForbiddenError:
self._log.debug(
"\033[93m"
+ "[get_latest_data] received 403 error, refreshing token and trying again"
+ "[get_latest_data] received 403 error, attempting to re-login and trying again"
+ "\033[0m"
)
await self.refresh_token()
await self.login()
data_latest = await self._api.data_latest()

# self._log.debug(f"[data_latest] returned\n{json_pp(data_latest)}")
Expand Down