Merge remote-tracking branch 'jarun_master/master'
jarun made a change before I fixed my pull request
This commit is contained in:
commit
1965956dbf
10
buku.py
10
buku.py
@ -1043,9 +1043,7 @@ class BukuDb:
|
||||
try:
|
||||
query = 'DELETE from bookmarks where id BETWEEN ? AND ?'
|
||||
self.cur.execute(query, (low, high))
|
||||
if not delay_commit:
|
||||
self.conn.commit()
|
||||
print('Bookmarks from index %s to %s deleted' % (low, high))
|
||||
print('Bookmarks from index %d to %d deleted' % (low, high))
|
||||
|
||||
# Compact DB by ascending order of index to ensure
|
||||
# the existing higher indices move only once
|
||||
@ -1064,11 +1062,11 @@ class BukuDb:
|
||||
try:
|
||||
query = 'DELETE FROM bookmarks WHERE id = ?'
|
||||
self.cur.execute(query, (index,))
|
||||
if not delay_commit:
|
||||
self.conn.commit()
|
||||
if self.cur.rowcount == 1:
|
||||
print('Removed index %d' % index)
|
||||
self.compactdb(index, delay_commit)
|
||||
self.compactdb(index, delay_commit=True)
|
||||
if not delay_commit:
|
||||
self.conn.commit()
|
||||
else:
|
||||
logerr('No matching index')
|
||||
return False
|
||||
|
Loading…
x
Reference in New Issue
Block a user