src/reportlab/lib/utils.py
changeset 3465 21c2d12661b9
parent 3437 65fc93c4c0c3
child 3517 d49ec5554d81
--- a/src/reportlab/lib/utils.py	Tue Oct 12 12:32:54 2010 +0000
+++ b/src/reportlab/lib/utils.py	Tue Oct 12 15:44:34 2010 +0000
@@ -519,7 +519,7 @@
 def _isPILImage(im):
     try:
         return isinstance(im,Image.Image)
-    except ImportError:
+    except AttributeError:
         return 0
 
 class ImageReader(object):
@@ -578,7 +578,7 @@
                     try:
                         self._width,self._height,c=readJPEGInfo(self.fp)
                     except:
-                        raise RuntimeError('Imaging Library not available, unable to import bitmaps only jpegs')
+                        annotateException('\nImaging Library not available, unable to import bitmaps only jpegs\nfileName=%r identity=%s'%(fileName,self.identity()))
                     self.jpeg_fh = self._jpeg_fh
                     self._data = self.fp.read()
                     self._dataA=None