[Zope-Checkins] SVN: Zope/branches/philikon-aq/lib/python/Products/Five/viewlet/manager.py Only wrap if there's __of__

Philipp von Weitershausen philikon at philikon.de
Fri Jul 27 17:09:29 EDT 2007


Log message for revision 78392:
  Only wrap if there's __of__
  

Changed:
  U   Zope/branches/philikon-aq/lib/python/Products/Five/viewlet/manager.py

-=-
Modified: Zope/branches/philikon-aq/lib/python/Products/Five/viewlet/manager.py
===================================================================
--- Zope/branches/philikon-aq/lib/python/Products/Five/viewlet/manager.py	2007-07-27 21:09:03 UTC (rev 78391)
+++ Zope/branches/philikon-aq/lib/python/Products/Five/viewlet/manager.py	2007-07-27 21:09:28 UTC (rev 78392)
@@ -65,7 +65,8 @@
         # the object has a real context from which to determine owner
         # security.
         for name, viewlet in viewlets:
-            viewlet = viewlet.__of__(viewlet.context)
+            if getattr(viewlet, '__of__', None) is not None:
+                viewlet = viewlet.__of__(viewlet.__parent__)
             if guarded_hasattr(viewlet, 'render'):
                 results.append((name, viewlet))
         return results



More information about the Zope-Checkins mailing list