Skip to content

Commit

Permalink
Do fallback but issue a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
judahrand committed Nov 10, 2022
1 parent 14a3d93 commit 623ac5d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/pip/_internal/network/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,12 @@ def get_keyring_provider() -> KeyRingBaseProvider:
pass
except Exception as exc:
# In the event of an unexpected exception
# we shouldn't fallback silently to the
# CliProvider
# we should warn the user
logger.warning(
"Keyring is skipped due to an exception: %s",
"Installed copy of keyring fails with exception %s, "
"trying to find a keyring executable as a fallback",
str(exc),
)
return KeyRingNullProvider()

# Fallback to Cli Provider if `keyring` isn't installed
cli = shutil.which("keyring")
Expand Down

0 comments on commit 623ac5d

Please sign in to comment.