From 6e38a86a8e948775b6b699d597d78dd6b7a00d30 Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Fri, 27 Sep 2013 15:43:24 -0700 Subject: [PATCH] BUG: AttributeError: 'function' object has no attribute 'im_func' on Python 3 --- PIL/WebPImagePlugin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PIL/WebPImagePlugin.py b/PIL/WebPImagePlugin.py index d5d75391c..62f1a1e54 100644 --- a/PIL/WebPImagePlugin.py +++ b/PIL/WebPImagePlugin.py @@ -40,7 +40,10 @@ class WebPImageFile(ImageFile.ImageFile): def _getexif(self): from PIL.JpegImagePlugin import JpegImageFile - return JpegImageFile._getexif.im_func(self) + try: + return JpegImageFile._getexif.im_func(self) + except AttributeError: + return JpegImageFile._getexif(self) def _save(im, fp, filename):