[Zope-Checkins] SVN: Zope/branches/philikon-aq/lib/python/OFS/Traversable.py Replace self.REQUEST with ac_acquire(self, 'REQUEST')

Hanno Schlichting plone at hannosch.info
Sat Jul 28 20:43:22 EDT 2007


Log message for revision 78450:
  Replace self.REQUEST with ac_acquire(self, 'REQUEST')
  

Changed:
  U   Zope/branches/philikon-aq/lib/python/OFS/Traversable.py

-=-
Modified: Zope/branches/philikon-aq/lib/python/OFS/Traversable.py
===================================================================
--- Zope/branches/philikon-aq/lib/python/OFS/Traversable.py	2007-07-29 00:27:36 UTC (rev 78449)
+++ Zope/branches/philikon-aq/lib/python/OFS/Traversable.py	2007-07-29 00:43:22 UTC (rev 78450)
@@ -22,7 +22,7 @@
 from AccessControl import getSecurityManager
 from AccessControl import Unauthorized
 from AccessControl.ZopeGuards import guarded_getattr
-from Acquisition import Acquired, aq_inner, aq_parent, aq_base
+from Acquisition import Acquired, aq_inner, aq_parent, aq_acquire, aq_base
 from zExceptions import NotFound
 from ZODB.POSException import ConflictError
 from OFS.interfaces import ITraversable
@@ -64,7 +64,7 @@
         spp = self.getPhysicalPath()
             
         try:
-            toUrl = self.REQUEST.physicalPathToURL
+            toUrl = aq_acquire(self, 'REQUEST').physicalPathToURL
         except AttributeError:
             return path2url(spp[1:])
         return toUrl(spp)
@@ -78,7 +78,7 @@
         """
         spp = self.getPhysicalPath()
         try:
-            toUrl = self.REQUEST.physicalPathToURL
+            toUrl = aq_acquire(self, 'REQUEST').physicalPathToURL
         except AttributeError:
             return path2url(spp) or '/'
         return toUrl(spp, relative=1) or '/'
@@ -93,7 +93,7 @@
         """
         spp = self.getPhysicalPath()
         try:
-            toVirt = self.REQUEST.physicalPathToVirtualPath
+            toVirt = aq_acquire(self, 'REQUEST').physicalPathToVirtualPath
         except AttributeError:
             return path2url(spp[1:])
         return path2url(toVirt(spp))
@@ -192,7 +192,7 @@
                         if ns:
                             try:
                                 next = namespaceLookup(
-                                    ns, nm, obj, self.REQUEST)
+                                    ns, nm, obj, aq_acquire(self, 'REQUEST'))
                                 if restricted and not validate(
                                     obj, obj, name, next):
                                     raise Unauthorized(name)
@@ -256,7 +256,7 @@
 
                 except (AttributeError, NotFound, KeyError), e:
                     # Try to look for a view
-                    next = queryMultiAdapter((obj, self.REQUEST),
+                    next = queryMultiAdapter((obj, aq_acquire(self, 'REQUEST')),
                                              Interface, name)
 
                     if next is not None:



More information about the Zope-Checkins mailing list