aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-12-14 10:58:48 -0500
committerB Stack <bgstack15@gmail.com>2020-12-14 10:58:48 -0500
commit03f2091c2dc80a34d4c497dcbc195be588577def (patch)
tree303c191a01478566773c591deffb3bfa231fd162
parentinitial commit (diff)
downloadmbbmlib-03f2091c2dc80a34d4c497dcbc195be588577def.tar.gz
mbbmlib-03f2091c2dc80a34d4c497dcbc195be588577def.tar.bz2
mbbmlib-03f2091c2dc80a34d4c497dcbc195be588577def.zip
only open favicons.sqlite if fetch_icons == True
-rw-r--r--mbbmlib.py5
1 files changed, 3 insertions, 2 deletions
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:
bgstack15