1
0
mirror of https://github.com/aquatix/digimarks.git synced 2025-12-06 23:05:10 +01:00

Catch case where favicon property is empty

This commit is contained in:
2018-03-23 13:11:06 +01:00
parent 0548f35b39
commit fac3a4f747

View File

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