mirror of
https://github.com/aquatix/digimarks.git
synced 2025-12-06 22:05:09 +01:00
Catch case where favicon property is empty
This commit is contained in:
@@ -958,8 +958,7 @@ def findmissingfavicons(systemkey):
|
|||||||
bookmarks = Bookmark.select()
|
bookmarks = Bookmark.select()
|
||||||
for bookmark in bookmarks:
|
for bookmark in bookmarks:
|
||||||
try:
|
try:
|
||||||
filename = os.path.join(MEDIA_ROOT, 'favicons/' + bookmark.favicon)
|
if not bookmark.favicon or not os.path.isfile(os.path.join(MEDIA_ROOT, 'favicons/' + bookmark.favicon)):
|
||||||
if not os.path.isfile(filename):
|
|
||||||
# This favicon is missing
|
# This favicon is missing
|
||||||
bookmark.set_favicon()
|
bookmark.set_favicon()
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user