qute-keepass: Add missing exit

Closes #6592
This commit is contained in:
Florian Bruhin 2021-07-13 10:50:38 +02:00
parent 84f9e9f863
commit cc8e67962b
2 changed files with 2 additions and 0 deletions

View File

@ -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
~~~~~~~

View File

@ -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)