summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)