Skip to content

Commit 09bdcde

Browse files
author
shaunsephton
committed
more robust pil import
1 parent d5760fa commit 09bdcde

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ckeditor/views.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
from django.template import RequestContext
77
from django.views.decorators.csrf import csrf_exempt
88

9-
from PIL import Image, ImageOps
9+
try:
10+
from PIL import Image, ImageOps
11+
except ImportError:
12+
import Image, ImageOps
1013

1114
THUMBNAIL_SIZE = (75, 75)
1215

0 commit comments

Comments
 (0)