Skip to content
Merged
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
5 changes: 5 additions & 0 deletions flixpy/flix/cli/interactive_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ async def _sign_in(self) -> None:
self.__config["access_key"] = access_key.to_json()

async def request(self, *args: Any, **kwargs: Any) -> aiohttp.ClientResponse:
# try to auth ahead of time only if the username and password
# were explicitly provided
if self.access_key is None and self.__username and self.__password:
await self._sign_in()

try:
return await super().request(*args, **kwargs)
except errors.FlixNotVerifiedError:
Expand Down