From fbc8d25a89f1acf9b65a034a6bf656896548f1a1 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Mon, 25 Apr 2016 02:13:00 +0530 Subject: [PATCH] Add check in compactDB for number of records. --- buku | 3 +++ 1 file changed, 3 insertions(+) diff --git a/buku b/buku index 8861a23..f6eb1a2 100755 --- a/buku +++ b/buku @@ -561,6 +561,9 @@ def compactDB(conn, cur, index): """ cur.execute('SELECT MAX(id) from bookmarks') + if cur.rowcount < 1: + return + results = cur.fetchall() for row in results: if row[0] > index: