Initial protection for not having PIL (either not installed or not available, python3)
svn: r23372
This commit is contained in:
parent
e06051fa7c
commit
8ece67cab1
@ -34,10 +34,13 @@ from django.template import Context, RequestContext
|
|||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
|
|
||||||
## Other Python Modules
|
## Other Python Modules
|
||||||
from PIL import Image
|
try:
|
||||||
NEW_PIL = [int(i) for i in Image.VERSION.split(".")] >= [1, 1, 7]
|
from PIL import Image
|
||||||
if not NEW_PIL:
|
NEW_PIL = [int(i) for i in Image.VERSION.split(".")] >= [1, 1, 7]
|
||||||
from . import png
|
if not NEW_PIL:
|
||||||
|
from . import png
|
||||||
|
except:
|
||||||
|
print("WARNING: No PIL installed or available")
|
||||||
import os
|
import os
|
||||||
|
|
||||||
## Globals
|
## Globals
|
||||||
|
Loading…
Reference in New Issue
Block a user