summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-07-13 10:50:38 +0200
committerFlorian Bruhin <me@the-compiler.org>2021-07-13 10:50:38 +0200
commitcc8e67962bae163eac80fe20e753aa90491bc6da (patch)
tree598090e7bef8b91c457a9b1c7350dd027a26ab81
parent84f9e9f86317609f89b78cf99d5a97643e914c99 (diff)
downloadqutebrowser-cc8e67962bae163eac80fe20e753aa90491bc6da.tar.gz
qutebrowser-cc8e67962bae163eac80fe20e753aa90491bc6da.zip
qute-keepass: Add missing exit
Closes #6592
-rw-r--r--doc/changelog.asciidoc1
-rwxr-xr-xmisc/userscripts/qute-keepass1
2 files changed, 2 insertions, 0 deletions
diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc
index 669a20c54..f8d0f0e8f 100644
--- a/doc/changelog.asciidoc
+++ b/doc/changelog.asciidoc
@@ -25,6 +25,7 @@ Fixed
- Switching tabs via mouse wheel scrolling now works properly on macOS. Set
`tabs.mousewheel_switching` to false if you prefer the previous behavior.
- Crash when entering unicode surrogates into the filename prompt.
+- `UnboundLocalError` in `qute-keepass` when the database couldn't be opened.
Changed
~~~~~~~
diff --git a/misc/userscripts/qute-keepass b/misc/userscripts/qute-keepass
index 090d3c713..285377ffc 100755
--- a/misc/userscripts/qute-keepass
+++ b/misc/userscripts/qute-keepass
@@ -178,6 +178,7 @@ def find_candidates(args, host):
kp = pykeepass.PyKeePass(file_path, password=pw, keyfile=kf)
except Exception as e:
stderr("There was an error opening the DB: {}".format(str(e)))
+ sys.exit(ExitCodes.DB_OPEN_FAIL)
return kp.find_entries(url="{}{}{}".format(".*", host, ".*"), regex=True)