Skip to content

Commit

Permalink
address PR comment
Browse files Browse the repository at this point in the history
(cherry picked from commit 49e858e)
  • Loading branch information
khlj authored and The-Compiler committed Apr 19, 2021
1 parent 951ab79 commit d64d595
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions misc/userscripts/qute-bitwarden
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,12 @@ def pass_(domain, encoding, auto_lock):
stderr=subprocess.PIPE,
)

if process.returncode:
err = process.stderr.decode(encoding).strip()
err = process.stderr.decode(encoding).strip()
if err:
msg = 'Bitwarden CLI returned for {:s} - {:s}'.format(domain, err)
stderr(msg)

if process.returncode:
return '[]'

out = process.stdout.decode(encoding).strip()
Expand All @@ -177,6 +179,8 @@ def get_totp_code(selection_id, domain_name, encoding, auto_lock):
# domain_name instead of selection_id to make it more user-friendly
msg = 'Bitwarden CLI returned for {:s} - {:s}'.format(domain_name, err)
stderr(msg)

if process.returncode:
return '[]'

out = process.stdout.decode(encoding).strip()
Expand Down

0 comments on commit d64d595

Please sign in to comment.