Skip to content

Commit

Permalink
Simplify reading favicon bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit74 committed Jul 13, 2023
1 parent 1549d02 commit 9cf1f95
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions kolibri2zim/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -768,8 +768,6 @@ def run(self):
main_path=self.root_id,
ignore_duplicates=True,
)
with open(self.favicon_fpath, "rb") as fh:
favicon_bytes = fh.read()
self.creator.config_metadata(
Name=self.name,
Language="eng",
Expand All @@ -778,9 +776,8 @@ def run(self):
Creator=self.author,
Publisher=self.publisher,
Date=datetime.date.today().strftime("%Y-%d-%m"),
Illustration_48x48_at_1= favicon_bytes,
Illustration_48x48_at_1=self.favicon_fpath.read_bytes(),
)
del favicon_bytes
self.creator.start()

succeeded = False
Expand Down

0 comments on commit 9cf1f95

Please sign in to comment.