summaryrefslogtreecommitdiff
path: root/print/hplip/files/patch-installer_dcheck.py
diff options
context:
space:
mode:
authorKai Knoblich <kai@FreeBSD.org>2019-06-02 21:00:06 +0000
committerKai Knoblich <kai@FreeBSD.org>2019-06-02 21:00:06 +0000
commit0c4024a80bbf9b679280ecce6f76a2bf54461dfc (patch)
tree95bbc8261a4bf28f1686a6c1536f72a08fbced35 /print/hplip/files/patch-installer_dcheck.py
parentdevel/gn: Update to 1592 (diff)
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)
Notes
Notes: svn path=/head/; revision=503333
Diffstat (limited to 'print/hplip/files/patch-installer_dcheck.py')
-rw-r--r--print/hplip/files/patch-installer_dcheck.py16
1 files changed, 14 insertions, 2 deletions
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: