From 070891ad6b66ff0fbff4f7b44bc0729fd71e2632 Mon Sep 17 00:00:00 2001 From: Joe Dallago Date: Tue, 18 Sep 2012 08:03:02 +0000 Subject: [PATCH] Now check for the existence of an __iter__ function as opposed type(self.preparer) == list, as per mcdonc's request. --- colander/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/colander/__init__.py b/colander/__init__.py index c4449c9..fbd30d8 100644 --- a/colander/__init__.py +++ b/colander/__init__.py @@ -1671,7 +1671,7 @@ class SchemaNode(object): if hasattr(self.preparer, '__call__'): appstruct = self.preparer(appstruct) # if the preparer is a list, call each separate preparer - elif type(self.preparer) is list: + elif hasattr(self.preparer, '__iter__'): for preparer in self.preparer: appstruct = preparer(appstruct)