From 7129baa9b2ceb9939db4b0bdf818d7cb1fae7ba3 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 27 Mar 2013 09:44:28 -0700 Subject: [PATCH 1/2] fix for if isinstance(filter, collections.Callable) crash. Python bug #7624 on <2.6.6 --- PIL/ImageFilter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PIL/ImageFilter.py b/PIL/ImageFilter.py index 71f42c3ac..c13f75bbc 100644 --- a/PIL/ImageFilter.py +++ b/PIL/ImageFilter.py @@ -17,7 +17,7 @@ from functools import reduce -class Filter: +class Filter(object): pass ## From 86bb25e73546c3e491aef75c1e13d559665adfee Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 27 Mar 2013 09:52:01 -0700 Subject: [PATCH 2/2] reenable basic webp test, skip if support not installed --- Tests/test_file_webp.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Tests/test_file_webp.py b/Tests/test_file_webp.py index 0d2c984b0..f7aad97f9 100644 --- a/Tests/test_file_webp.py +++ b/Tests/test_file_webp.py @@ -2,7 +2,12 @@ from tester import * from PIL import Image -def xtest_read(): +codecs = dir(Image.core) + +if "webp_encoder" not in codecs or "webp_decoder" not in codecs: + skip("webp support not available") + +def test_read(): """ Can we write a webp without error. Does it have the bits we expect?""" file = "Images/lena.webp"