data/convert-icon: Support Pillow in addition to PIL

This commit is contained in:
Fabian Greffrath 2017-04-24 10:27:26 +02:00
parent fb7a43cb4d
commit 429fa571c4

View file

@ -23,8 +23,13 @@ import re
try: try:
import Image import Image
except ImportError: except ImportError:
print("WARNING: Could not update %s. Please install the Python Imaging library." % sys.argv[2]) try:
sys.exit(0) 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): def convert_image(filename, output_filename):