BUG: AttributeError: 'function' object has no attribute 'im_func' on Python 3

This commit is contained in:
Christoph Gohlke 2013-09-27 15:43:24 -07:00
parent 172e0d8bdb
commit 6e38a86a8e

View File

@ -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):