Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
2001fb27
Commit
2001fb27
authored
Jul 29, 2007
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace self.REQUEST with ac_acquire(self, 'REQUEST')
parent
9f18a95b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
lib/python/OFS/Traversable.py
lib/python/OFS/Traversable.py
+6
-6
No files found.
lib/python/OFS/Traversable.py
View file @
2001fb27
...
@@ -22,7 +22,7 @@ from AccessControl import ClassSecurityInfo
...
@@ -22,7 +22,7 @@ from AccessControl import ClassSecurityInfo
from
AccessControl
import
getSecurityManager
from
AccessControl
import
getSecurityManager
from
AccessControl
import
Unauthorized
from
AccessControl
import
Unauthorized
from
AccessControl.ZopeGuards
import
guarded_getattr
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
zExceptions
import
NotFound
from
ZODB.POSException
import
ConflictError
from
ZODB.POSException
import
ConflictError
from
OFS.interfaces
import
ITraversable
from
OFS.interfaces
import
ITraversable
...
@@ -64,7 +64,7 @@ class Traversable:
...
@@ -64,7 +64,7 @@ class Traversable:
spp
=
self
.
getPhysicalPath
()
spp
=
self
.
getPhysicalPath
()
try
:
try
:
toUrl
=
self
.
REQUEST
.
physicalPathToURL
toUrl
=
aq_acquire
(
self
,
'REQUEST'
)
.
physicalPathToURL
except
AttributeError
:
except
AttributeError
:
return
path2url
(
spp
[
1
:])
return
path2url
(
spp
[
1
:])
return
toUrl
(
spp
)
return
toUrl
(
spp
)
...
@@ -78,7 +78,7 @@ class Traversable:
...
@@ -78,7 +78,7 @@ class Traversable:
"""
"""
spp
=
self
.
getPhysicalPath
()
spp
=
self
.
getPhysicalPath
()
try
:
try
:
toUrl
=
self
.
REQUEST
.
physicalPathToURL
toUrl
=
aq_acquire
(
self
,
'REQUEST'
)
.
physicalPathToURL
except
AttributeError
:
except
AttributeError
:
return
path2url
(
spp
)
or
'/'
return
path2url
(
spp
)
or
'/'
return
toUrl
(
spp
,
relative
=
1
)
or
'/'
return
toUrl
(
spp
,
relative
=
1
)
or
'/'
...
@@ -93,7 +93,7 @@ class Traversable:
...
@@ -93,7 +93,7 @@ class Traversable:
"""
"""
spp
=
self
.
getPhysicalPath
()
spp
=
self
.
getPhysicalPath
()
try
:
try
:
toVirt
=
self
.
REQUEST
.
physicalPathToVirtualPath
toVirt
=
aq_acquire
(
self
,
'REQUEST'
)
.
physicalPathToVirtualPath
except
AttributeError
:
except
AttributeError
:
return
path2url
(
spp
[
1
:])
return
path2url
(
spp
[
1
:])
return
path2url
(
toVirt
(
spp
))
return
path2url
(
toVirt
(
spp
))
...
@@ -192,7 +192,7 @@ class Traversable:
...
@@ -192,7 +192,7 @@ class Traversable:
if
ns
:
if
ns
:
try
:
try
:
next
=
namespaceLookup
(
next
=
namespaceLookup
(
ns
,
nm
,
obj
,
self
.
REQUEST
)
ns
,
nm
,
obj
,
aq_acquire
(
self
,
'REQUEST'
)
)
if
restricted
and
not
validate
(
if
restricted
and
not
validate
(
obj
,
obj
,
name
,
next
):
obj
,
obj
,
name
,
next
):
raise
Unauthorized
(
name
)
raise
Unauthorized
(
name
)
...
@@ -256,7 +256,7 @@ class Traversable:
...
@@ -256,7 +256,7 @@ class Traversable:
except
(
AttributeError
,
NotFound
,
KeyError
),
e
:
except
(
AttributeError
,
NotFound
,
KeyError
),
e
:
# Try to look for a view
# Try to look for a view
next
=
queryMultiAdapter
((
obj
,
self
.
REQUEST
),
next
=
queryMultiAdapter
((
obj
,
aq_acquire
(
self
,
'REQUEST'
)
),
Interface
,
name
)
Interface
,
name
)
if
next
is
not
None
:
if
next
is
not
None
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment