Skip to content

Commit 9058b90

Browse files
committed
fix: correct the way to decide if keyring is available
1 parent 56e5fa3 commit 9058b90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pip/_internal/network/auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ def _prompt_for_password(
359359

360360
# Factored out to allow for easy patching in tests
361361
def _should_save_password_to_keyring(self) -> bool:
362-
if get_keyring_provider() is None:
362+
if isinstance(get_keyring_provider(), KeyRingNullProvider):
363363
return False
364364
return ask("Save credentials to keyring [y/N]: ", ["y", "n"]) == "y"
365365

0 commit comments

Comments
 (0)