aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tests
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2013-04-08 11:19:56 +0300
committerAlon Levy <alon@pobox.com>2013-04-17 12:54:54 +0300
commitd0e9f843e23196f790b640327bef3718e74b0347 (patch)
treebe7453ce7e6109328a98d7e5efd7cc4bac1aa8e5 /mediagoblin/tests
parent519bcfb0e6753f53fb5fc52a5b76d0472fda4ac7 (diff)
downloadmediagoblin-d0e9f843e23196f790b640327bef3718e74b0347.tar.lz
mediagoblin-d0e9f843e23196f790b640327bef3718e74b0347.tar.xz
mediagoblin-d0e9f843e23196f790b640327bef3718e74b0347.zip
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>
Diffstat (limited to 'mediagoblin/tests')
-rw-r--r--mediagoblin/tests/test_exif.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mediagoblin/tests/test_exif.py b/mediagoblin/tests/test_exif.py
index 5eeaa676..824de3c2 100644
--- a/mediagoblin/tests/test_exif.py
+++ b/mediagoblin/tests/test_exif.py
@@ -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