Prevent `keyring` from ever reading from `stdin`
It shouldn't need to ever so no reason to allow it and have
to jiggle around the `--no-input` option in `pip`.
@@ -47,7 +47,10 @@ class KeyRingCli:
def get_password(self, service_name: str, username: str) -> Optional[str]:
cmd = [self.keyring, "get", service_name, username]
res = subprocess.run(
- cmd, capture_output=True, env=dict(PYTHONIOENCODING="utf-8")
+ cmd,
+ stdin=subprocess.DEVNULL,
+ capture_output=True,
+ env=dict(PYTHONIOENCODING="utf-8"),
)
if res.returncode:
return None
