Skip to content

New setting VERSATILEIMAGEFIELD_CRASH_ON_BAD - #124

Closed
litchfield wants to merge 4 commits into
respondcreate:masterfrom
litchfield:master
Closed

litchfield wants to merge 4 commits into
respondcreate:masterfrom
litchfield:master

Conversation

@litchfield

Copy link
Copy Markdown

In a large production deployment, we found some image files were crashing PIL. We didn't like that, and neither did our users.

New setting, VERSATILEIMAGEFIELD_CRASH_ON_BAD, default True to match current behaviour.

Set it to False, and it will (won't?) do what it says on the tin. Crises (plural) averted. It'll still raise a warning though, in case you're interested.

@coveralls

coveralls commented Apr 4, 2018 •

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.2%) to 99.787% when pulling acb62c8 on litchfield:master into d46f056 on respondcreate:master.

@tuky tuky left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, that this module is too generous towards errors. May I request some changes?

  • code coverage decreased. we probably need a test for the exception code path
  • VersatileImageFieldWarmer._prewarm_versatileimagefield can still swallow all exceptions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants