Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Silence keyring warnings by changing to debug #1568

Merged
merged 1 commit into from
Mar 30, 2023
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
6 changes: 3 additions & 3 deletions flytekit/clients/auth/keyring.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def store(credentials: Credentials) -> Credentials:
credentials.access_token,
)
except NoKeyringError as e:
logging.warning(f"KeyRing not available, tokens will not be cached. Error: {e}")
logging.debug(f"KeyRing not available, tokens will not be cached. Error: {e}")
return credentials

@staticmethod
Expand All @@ -49,7 +49,7 @@ def retrieve(for_endpoint: str) -> typing.Optional[Credentials]:
refresh_token = _keyring.get_password(for_endpoint, KeyringStore._refresh_token_key)
access_token = _keyring.get_password(for_endpoint, KeyringStore._access_token_key)
except NoKeyringError as e:
logging.warning(f"KeyRing not available, tokens will not be cached. Error: {e}")
logging.debug(f"KeyRing not available, tokens will not be cached. Error: {e}")
return None

if not access_token:
Expand All @@ -62,4 +62,4 @@ def delete(for_endpoint: str):
_keyring.delete_password(for_endpoint, KeyringStore._access_token_key)
_keyring.delete_password(for_endpoint, KeyringStore._refresh_token_key)
except NoKeyringError as e:
logging.warning(f"KeyRing not available, tokens will not be cached. Error: {e}")
logging.debug(f"KeyRing not available, tokens will not be cached. Error: {e}")