forked from getnikola/nikola
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix exception from gallery RSS with WebP images
WebP images in a gallery cause `nikola build` to fail with an unhandled AttributeError exception, as described in getnikola#3671. This happens because the MIME type of WebP images is not known, and the resulting None value causes the RSS generation code to choke. This PR fixes that, by augmenting Python's list of known mimetypes with a hardcoded WebP one, before we ask for the mimetype of each image in a gallery. This addresses the above issue's checklist item "*Inject a hardcoded 'image/web' mimetype at runtime, before .guess_type() gets called.*", but does not complete the issue.
- Loading branch information
Showing
4 changed files
with
4 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters