summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrank shin <im@frnkshin.io>2021-04-17 01:29:01 -0400
committerFlorian Bruhin <me@the-compiler.org>2021-04-19 11:28:05 +0200
commitd64d59502ab219077abed8f8b9ac12fc3e3bc35c (patch)
tree0aa8a0a596781354489fbd6e25352bd851658483
parent951ab7902e23ff4490c1e344305945374634faca (diff)
downloadqutebrowser-d64d59502ab219077abed8f8b9ac12fc3e3bc35c.tar.gz
qutebrowser-d64d59502ab219077abed8f8b9ac12fc3e3bc35c.zip
address PR comment
(cherry picked from commit 49e858e7d44b6e3ba24a388e2bdbffeb88d9adb8)
-rwxr-xr-xmisc/userscripts/qute-bitwarden8
1 files changed, 6 insertions, 2 deletions
diff --git a/misc/userscripts/qute-bitwarden b/misc/userscripts/qute-bitwarden
index e94ab0a24..c6407127a 100755
--- a/misc/userscripts/qute-bitwarden
+++ b/misc/userscripts/qute-bitwarden
@@ -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()
@@ -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()