mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-04-30 04:47:28 -07:00
Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: David Seifert <soap@gentoo.org>
18 lines
915 B
Diff
18 lines
915 B
Diff
--- a/src/reportlab/lib/utils.py
|
|
+++ b/src/reportlab/lib/utils.py
|
|
@@ -883,7 +883,13 @@
|
|
im = self._image
|
|
mode = self.mode = im.mode
|
|
if mode in ('LA','RGBA'):
|
|
- if Image.VERSION.startswith('1.1.7'): im.load()
|
|
+ # Pillow 6.0.0 and above have removed the 'VERSION' attribute
|
|
+ # https://bitbucket.org/rptlab/reportlab/issues/176/incompatibility-with-pillow-600
|
|
+ try:
|
|
+ im_ver = Image.__version__
|
|
+ except AttributeError:
|
|
+ im_ver = Image.VERSION
|
|
+ if im_ver.startswith('1.1.7'): im.load()
|
|
self._dataA = ImageReader(im.split()[3 if mode=='RGBA' else 1])
|
|
nm = mode[:-1]
|
|
im = im.convert(nm)
|