Procházet zdrojové kódy

Changing import of Image

The::

    import Image as PImage

was failing since the switch to `Pillow`. The commit changes it to::

    from PIL import Image
master
Moose před 13 roky
rodič
revize
5ccd7e667e
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2
    2
      oscar/apps/catalogue/utils.py

+ 2
- 2
oscar/apps/catalogue/utils.py Zobrazit soubor

@@ -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}

Načítá se…
Zrušit
Uložit