Merge remote-tracking branch 'jarun_master/master'

jarun made a change before I fixed my pull request
This commit is contained in:
Damian 2016-11-28 20:47:18 -05:00
commit 1965956dbf

10
buku.py
View File

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