Skip to content

Commit 43abcf0

Browse files
committed
Set keyring correctly
1 parent f5c96b1 commit 43abcf0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pip/_internal/network/auth.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ def set_password(cls, service_name: str, username: str, password: str) -> None:
6363
try:
6464
import keyring
6565
except ImportError:
66+
keyring = None # type: ignore[assignment]
6667
if shutil.which("keyring") is not None:
6768
keyring = KeyRingCli # type: ignore[assignment]
68-
keyring = None # type: ignore[assignment]
6969
except Exception as exc:
7070
logger.warning(
7171
"Keyring is skipped due to an exception: %s",

0 commit comments

Comments
 (0)