Show error once
Show error string only once when deleting a non-existent record by index. E.g.: buku -d non_existent_id Fix indentation issue.
This commit is contained in:
parent
c5b39b8491
commit
4b4e5ffe37
8
buku.py
8
buku.py
@ -1362,6 +1362,12 @@ class BukuDb:
|
||||
else: # Remove a single entry
|
||||
try:
|
||||
if self.chatty:
|
||||
self.cur.execute('SELECT COUNT(*) FROM bookmarks WHERE id = ? LIMIT 1', (index,))
|
||||
count = self.cur.fetchone()
|
||||
if (count[0] < 1):
|
||||
logerr('No matching index %d', index)
|
||||
return False
|
||||
|
||||
if self.print_rec(index) is True:
|
||||
resp = input('Delete this bookmark? (y/n): ')
|
||||
if resp != 'y':
|
||||
@ -3898,7 +3904,7 @@ def delim_wrap(token):
|
||||
if token[-1] != DELIM:
|
||||
token = token + DELIM
|
||||
|
||||
return token
|
||||
return token
|
||||
|
||||
|
||||
def read_in(msg):
|
||||
|
Loading…
x
Reference in New Issue
Block a user