Commits

Jakub Wilk  committed f2a4f31

Use ‘from PIL import Image’ instead of ‘import Image’.
According to <http://mail.python.org/pipermail/image-sig/2011-January/006650.html>; the latter won't be supported in PIL 1.2.

  • Participants
  • Parent commits 16dcffd

Comments (0)

Files changed (2)

File doc/changelog

+didjvu (0.2.6) UNRELEASED; urgency=low
+
+  * Fix compatibility with PIL ≥ 1.2.
+
+ -- Jakub Wilk <jwilk@jwilk.net>  Thu, 10 May 2012 22:30:44 +0200
+
 didjvu (0.2.5) unstable; urgency=low
 
   * Use RFC 3339 date format in the manual page. Don't call external programs

File lib/gamera_extra.py

 from . import utils
 
 try:
-    import Image as PIL
+    from PIL import Image as PIL
 except ImportError, ex:
     utils.enhance_import_error(ex, 'Python Imaging Library', 'python-imaging', 'http://www.pythonware.com/products/pil/')
     raise
+else:
+    # Gamera still expects that PIL can be imported as Image
+    sys.modules['Image'] = PIL
 
 try:
     import gamera