[Zope3-checkins] CVS: Zope3/src/zope/app/traversing - adapters.py:1.13

Jim Fulton jim@zope.com
Sat, 21 Jun 2003 17:20:37 -0400


Update of /cvs-repository/Zope3/src/zope/app/traversing
In directory cvs.zope.org:/tmp/cvs-serv2725

Modified Files:
	adapters.py 
Log Message:
Fixed some code that reflected the incorrect assumption that all
objects have __class__ attributes.


=== Zope3/src/zope/app/traversing/adapters.py 1.12 => 1.13 ===
--- Zope3/src/zope/app/traversing/adapters.py:1.12	Fri Jun 20 02:53:56 2003
+++ Zope3/src/zope/app/traversing/adapters.py	Sat Jun 21 17:20:36 2003
@@ -54,7 +54,7 @@
             #     That much is expected from page templates.
             #     What about classmethods / staticmethods / other descriptors?
             #     What about methods that take several arguments?
-            if r.__class__ == MethodType:
+            if getattr(r, '__class__', 0) == MethodType:
                 return r()
             return r