mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #6054: work around PIL's installation brokeness by detecting either of the two ways it can end up being installed.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12429 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -18,12 +18,16 @@ try:
|
||||
except ImportError:
|
||||
import dummy_threading as threading
|
||||
|
||||
# Try to import PIL in either of the two ways it can end up installed.
|
||||
# Checking for the existence of Image is enough for CPython, but
|
||||
# for PyPy, you need to check for the underlying modules
|
||||
try:
|
||||
# Checking for the existence of Image is enough for CPython, but
|
||||
# for PyPy, you need to check for the underlying modules
|
||||
from PIL import Image, _imaging
|
||||
except ImportError:
|
||||
Image = None
|
||||
try:
|
||||
import Image, _imaging
|
||||
except ImportError:
|
||||
Image = None
|
||||
|
||||
class FileStorageTests(unittest.TestCase):
|
||||
storage_class = FileSystemStorage
|
||||
|
||||
Reference in New Issue
Block a user