keyringer backend: handle 'Nothing matches' output, keyringer doesn't fail properly
This commit is contained in:
@@ -121,7 +121,10 @@ class Keyringer(PasswordManager):
|
||||
check=True,
|
||||
encoding="utf-8",
|
||||
)
|
||||
return result.stdout.strip()
|
||||
password = result.stdout.strip()
|
||||
if "Nothing matches , try again." in password:
|
||||
raise SystemExit(f"No password stored for {secretname}")
|
||||
return password
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
|
||||
Reference in New Issue
Block a user