|
|
@@ -4,7 +4,7 @@ import tarfile
|
|
4
|
4
|
import zipfile
|
|
5
|
5
|
import tempfile
|
|
6
|
6
|
import shutil
|
|
7
|
|
-import Image as PImage
|
|
|
7
|
+from PIL import Image
|
|
8
|
8
|
|
|
9
|
9
|
from django.core.files import File
|
|
10
|
10
|
from django.core.exceptions import FieldError
|
|
|
@@ -106,7 +106,7 @@ class Importer(object):
|
|
106
|
106
|
|
|
107
|
107
|
def _process_image(self, dirname, filename, lookup_value):
|
|
108
|
108
|
file_path = os.path.join(dirname, filename)
|
|
109
|
|
- trial_image = PImage.open(file_path)
|
|
|
109
|
+ trial_image = Image.open(file_path)
|
|
110
|
110
|
trial_image.verify()
|
|
111
|
111
|
|
|
112
|
112
|
kwargs = {self._field: lookup_value}
|