From 0c4024a80bbf9b679280ecce6f76a2bf54461dfc Mon Sep 17 00:00:00 2001 From: Kai Knoblich Date: Sun, 2 Jun 2019 21:00:06 +0000 Subject: print/hplip: Fix runtime with graphics/py-pillow 6.0.0 Fix a possible runtime error in installers/dcheck.py when graphics/py-pillow is updated to 6.0.0, which removed the previously deprecated constant Image.VERSION . PR: 238072, 237426 (related) Approved by: woodsb02 (maintainer) --- print/hplip/files/patch-installer_dcheck.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'print/hplip/files/patch-installer_dcheck.py') diff --git a/print/hplip/files/patch-installer_dcheck.py b/print/hplip/files/patch-installer_dcheck.py index 10a435c16bfd..abea82e34aa9 100644 --- a/print/hplip/files/patch-installer_dcheck.py +++ b/print/hplip/files/patch-installer_dcheck.py @@ -1,4 +1,4 @@ ---- installer/dcheck.py.orig 2016-08-26 10:05:26 UTC +--- installer/dcheck.py.orig 2019-05-23 09:47:03 UTC +++ installer/dcheck.py @@ -48,7 +48,11 @@ mod_output = '' def update_ld_output(): @@ -13,7 +13,19 @@ if status != 0: log.debug("ldconfig failed.") -@@ -378,6 +382,8 @@ def get_libpthread_version(): +@@ -370,7 +374,10 @@ def get_pil_version(): + except ImportError: + return '-' + else: +- return Image.VERSION ++ if hasattr(Image, "__version__"): # required for Pillow >= 6.0.0 ++ return Image.__version__ ++ else: ++ return Image.VERSION + + def get_libpthread_version(): + try: +@@ -378,6 +385,8 @@ def get_libpthread_version(): except ImportError: return '-' else: -- cgit v1.2.3