summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorfrank shin <im@frnkshin.io>2021-04-17 01:29:01 -0400
committerfrank shin <im@frnkshin.io>2021-04-17 01:29:01 -0400
commit49e858e7d44b6e3ba24a388e2bdbffeb88d9adb8 (patch)
tree5fc4d65aa6c1df806b926396c7e87ee824bb51be /misc
parent909230a8acd0423a85322602453cddad372072d8 (diff)
downloadqutebrowser-49e858e7d44b6e3ba24a388e2bdbffeb88d9adb8.tar.gz
qutebrowser-49e858e7d44b6e3ba24a388e2bdbffeb88d9adb8.zip
address PR comment
Diffstat (limited to 'misc')
-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()