From b9590a69357917a3dbf2c7234774803bd43767ef Mon Sep 17 00:00:00 2001 From: Simon Charette Date: Mon, 19 Aug 2013 18:42:48 -0400 Subject: [PATCH] Correctly format missing Pillow/PIL exceptions messages. refs #19934 --- django/utils/image.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/utils/image.py b/django/utils/image.py index dd2fab6197f..8df58503386 100644 --- a/django/utils/image.py +++ b/django/utils/image.py @@ -102,7 +102,7 @@ def _detect_image_library(): except ImportError as err: # Neither worked, so it's likely not installed. raise ImproperlyConfigured( - _("Neither Pillow nor PIL could be imported: %s" % err) + _("Neither Pillow nor PIL could be imported: %s") % err ) # ``Image.alpha_composite`` was added to Pillow in SHA: e414c6 & is not @@ -125,7 +125,7 @@ def _detect_image_library(): except ImportError as err: raise ImproperlyConfigured( _("The '_imaging' module for the PIL could not be " - "imported: %s" % err) + "imported: %s") % err ) # Try to import ImageFile as well.