Changed audio.* Image* imports
authorJoar Wandborg <git@wandborg.com>
Tue, 27 Mar 2012 21:43:15 +0000 (23:43 +0200)
committerJoar Wandborg <git@wandborg.com>
Tue, 27 Mar 2012 21:43:15 +0000 (23:43 +0200)
so that they no longer import from PIL explicitly.
This is due to explicit PIL.Image* imports failing
on a Ubuntu machine within virtualenv.

PIL is a mystery I have yet to find the energy to unravel.

The 'implicit' approach works both for the affected
machine and my local machine and I've seen it more often
out in the wild, so I'm assuming it is the right way.

extlib/freesound/audioprocessing.py
mediagoblin/media_types/audio/transcoders.py

index 2c2b35b587cccddf52952bcf4da6340f4f51fc52..c1dfe2eb8e160a0b8d4bdebca7c4142cc165a488 100644 (file)
@@ -20,7 +20,7 @@
 #   Bram de Jong <bram.dejong at domain.com where domain in gmail>
 #   2012, Joar Wandborg <first name at last name dot se>
 
-from PIL import Image, ImageDraw, ImageColor #@UnresolvedImport
+import Image, ImageDraw, ImageColor #@UnresolvedImport
 from functools import partial
 import math
 import numpy
index f84ab7f27b6177054e152f3e096a64cf6b9395a7..be80aa0e9841eef1d73f35f195b9a9678a0fd51b 100644 (file)
@@ -16,7 +16,7 @@
 
 import pdb
 import logging
-from PIL import Image
+import Image
 
 from mediagoblin.processing import BadMediaFail
 from mediagoblin.media_types.audio import audioprocessing