mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 10:16:17 +03:00
py3k: Remove callable() function
callable(c) is isinstance(x, collections.Callable) in py3k.
This commit is contained in:
parent
718dbcc8ca
commit
b386ed14dd
|
@ -71,6 +71,7 @@ import os, sys
|
|||
|
||||
# type stuff
|
||||
from types import IntType, StringType, TupleType
|
||||
import collections
|
||||
|
||||
try:
|
||||
UnicodeStringType = type(unicode(""))
|
||||
|
@ -802,7 +803,7 @@ class Image:
|
|||
|
||||
self.load()
|
||||
|
||||
if callable(filter):
|
||||
if isinstance(filter, collections.Callable):
|
||||
filter = filter()
|
||||
if not hasattr(filter, "filter"):
|
||||
raise TypeError("filter argument should be ImageFilter.Filter instance or class")
|
||||
|
|
Loading…
Reference in New Issue
Block a user