Log message for revision 65681:
  
  fixed traverser
  

Changed:
  U   Products.Five/trunk/browser/pagetemplatefile.py

-=-
Modified: Products.Five/trunk/browser/pagetemplatefile.py
===================================================================
--- Products.Five/trunk/browser/pagetemplatefile.py     2006-03-01 21:00:33 UTC 
(rev 65680)
+++ Products.Five/trunk/browser/pagetemplatefile.py     2006-03-01 21:13:20 UTC 
(rev 65681)
@@ -42,15 +42,15 @@
         next = getattr(object, name, _marker)
         if next is not _marker:
             object = next
-        elif hasattr(object, '__getitem__'):
+        else:
             try:
-                object = object[name]
-            except KeyError:
-                # deal with traversal through bobo_traverse()
                 object = object.restrictedTraverse(name)
-        else:
-            # Allow AttributeError to propagate
-            object = getattr(object, name)
+            except (KeyError, AttributeError):
+                try:
+                    object = object[name]
+                except:
+                    object = getattr(object, name)
+
     return object
 
 

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins

Reply via email to