foxygit / doom Log in
commit 429fa571c476bf8ffb8aa9994e63db0ef79efe23
Author:     Fabian Greffrath <fabian@greffrath.com>
AuthorDate: Mon Apr 24 10:27:26 2017 +0200
Commit:     Fabian Greffrath <fabian@greffrath.com>
CommitDate: Mon Apr 24 10:27:26 2017 +0200

    data/convert-icon: Support Pillow in addition to PIL
---
 data/convert-icon | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/data/convert-icon b/data/convert-icon
index ae1b0683..66ca7da5 100755
--- a/data/convert-icon
+++ b/data/convert-icon
@@ -23,8 +23,13 @@ import re
 try:
         import Image
 except ImportError:
-        print("WARNING: Could not update %s.  Please install the Python Imaging library." % sys.argv[2])
-        sys.exit(0)
+        try:
+                from PIL import Image
+        except ImportError:
+                print("WARNING: Could not update %s.  "
+                      "Please install the Python Imaging library or Pillow."
+                      % sys.argv[2])
+                sys.exit(0)


 def convert_image(filename, output_filename):