Now check for the existence of an __iter__ function as opposed type(self.preparer) == list, as per mcdonc's request.

This commit is contained in:
Joe Dallago
2012-09-18 08:03:02 +00:00
parent 916dd4c9e8
commit 070891ad6b

View File

@@ -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)