Skip to content

Commit

Permalink
fix: return a SimpleCredential from all return paths of kwallet.get_c…
Browse files Browse the repository at this point in the history
…redential

Fixes jaraco#463
  • Loading branch information
muggenhor committed Sep 8, 2020
1 parent 90348b5 commit 071d48a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion keyring/backends/kwallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def get_credential(self, service, username):
Otherwise, it will return the first username and password combo that it finds.
"""
if username is not None:
return self.get_password(service, username)
return SimpleCredential(str(username), self.get_password(service, username))
if not self.connected(service):
# the user pressed "cancel" when prompted to unlock their keyring.
raise KeyringLocked("Failed to unlock the keyring!")
Expand Down

0 comments on commit 071d48a

Please sign in to comment.