[Zope-Checkins] SVN: Zope/branches/philikon-aq/lib/python/Products/Five/browser/pagetemplatefile.py Avoid infinite recursion for messed up aq_chains.

Hanno Schlichting plone at hannosch.info
Sat Jul 28 16:11:11 EDT 2007


Log message for revision 78435:
  Avoid infinite recursion for messed up aq_chains.

Changed:
  U   Zope/branches/philikon-aq/lib/python/Products/Five/browser/pagetemplatefile.py

-=-
Modified: Zope/branches/philikon-aq/lib/python/Products/Five/browser/pagetemplatefile.py
===================================================================
--- Zope/branches/philikon-aq/lib/python/Products/Five/browser/pagetemplatefile.py	2007-07-28 19:52:46 UTC (rev 78434)
+++ Zope/branches/philikon-aq/lib/python/Products/Five/browser/pagetemplatefile.py	2007-07-28 20:11:10 UTC (rev 78435)
@@ -17,6 +17,7 @@
 """
 import zope.app.pagetemplate
 
+from Acquisition import aq_base
 from Acquisition import aq_parent
 from AccessControl import getSecurityManager
 from Products.PageTemplates.Expressions import SecureModuleImporter
@@ -38,7 +39,7 @@
         # get the root
         obj = context['context']
         root = None
-        while (getattr(obj, 'getPhysicalRoot', None) is None
+        while (getattr(aq_base(obj), 'getPhysicalRoot', None) is None
                and aq_parent(obj) is not None):
             obj = aq_parent(obj)
         if getattr(obj, 'getPhysicalRoot', None) is not None:



More information about the Zope-Checkins mailing list