From 03f2091c2dc80a34d4c497dcbc195be588577def Mon Sep 17 00:00:00 2001 From: B Stack Date: Mon, 14 Dec 2020 10:58:48 -0500 Subject: only open favicons.sqlite if fetch_icons == True --- mbbmlib.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mbbmlib.py') diff --git a/mbbmlib.py b/mbbmlib.py index 68cbca2..8af4e56 100644 --- a/mbbmlib.py +++ b/mbbmlib.py @@ -323,8 +323,9 @@ class Bookmark: raw_bookmarks= conn.execute("SELECT id,type,fk,parent,position,title,keyword_id,folder_type,dateAdded,lastModified,guid FROM moz_bookmarks") raw_places = conn.execute("SELECT id,url,title,rev_host,visit_count,hidden,typed,favicon_id,frecency,last_visit_date,guid,foreign_count,url_hash FROM moz_places") - with sqlite3.connect(icons_file) as conn: - raw_icons = conn.execute("SELECT * FROM moz_icons") + if fetch_icons: + with sqlite3.connect(icons_file) as conn: + raw_icons = conn.execute("SELECT * FROM moz_icons") if browser == "firefox": for row in raw_bookmarks: -- cgit