ref: 429fa571c476bf8ffb8aa9994e63db0ef79efe23
parent: fb7a43cb4d183137ca6107a9bd65f528bd775990
author: Fabian Greffrath <fabian@greffrath.com>
date: Mon Apr 24 06:27:26 EDT 2017
data/convert-icon: Support Pillow in addition to PIL
--- a/data/convert-icon
+++ b/data/convert-icon
@@ -23,8 +23,13 @@
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):