Skip to content

Commit 3d2f6b5

Browse files
committed
Check if db path exists before asking for password. Closes #178
1 parent 46e2e34 commit 3d2f6b5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

keepmenu/keepmenu.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ def get_database(open_databases=None, **kwargs):
165165
dbs.append(db_)
166166
if not sel or not dbs:
167167
return None, open_databases
168+
if not isfile(dbs[0].dbase):
169+
dmenu_err("Database does not exist. Check path and filename.")
170+
return None, open_databases
168171
if dbs[0].pword is None:
169172
dbs[0].pword = get_passphrase()
170173
if dbs[0].pword is None:

0 commit comments

Comments
 (0)