PIL: Support systems with Pillow and without
Fixes for systems with Pillow, but leaves a "try: except ImportError" to support anything that doesn't have a PIL top level import. Signed-off-by: Alon Levy <alon@pobox.com>
This commit is contained in:
@@ -15,7 +15,10 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os
|
||||
import Image
|
||||
try:
|
||||
from PIL import Image
|
||||
except ImportError:
|
||||
import Image
|
||||
|
||||
from mediagoblin.tools.exif import exif_fix_image_orientation, \
|
||||
extract_exif, clean_exif, get_gps_data, get_useful
|
||||
|
||||
Reference in New Issue
Block a user