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
70ea0f22
Commit
70ea0f22
authored
Sep 15, 2007
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Collector #2352: fix in OFS.Traversable
parent
24184a87
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
11 deletions
+18
-11
doc/CHANGES.txt
doc/CHANGES.txt
+2
-0
lib/python/OFS/Traversable.py
lib/python/OFS/Traversable.py
+10
-10
lib/python/OFS/tests/testTraverse.py
lib/python/OFS/tests/testTraverse.py
+6
-1
No files found.
doc/CHANGES.txt
View file @
70ea0f22
...
...
@@ -149,6 +149,8 @@ Zope Changes
Bugs Fixed
- Collector #2352: fix in OFS.Traversable
- Collector #2346: username logging in FCGI crashed the server
- Collector #2339: ZPT: fixed unicode issue when using the 'structure'
...
...
lib/python/OFS/Traversable.py
View file @
70ea0f22
...
...
@@ -186,10 +186,9 @@ class Traversable:
bobo_traverse
=
getattr
(
obj
,
'__bobo_traverse__'
,
None
)
try
:
if
name
and
name
[:
1
]
in
'@+'
and
name
!=
'+'
:
if
name
and
name
[:
1
]
in
'@+'
and
name
!=
'+'
and
nsParse
(
name
)[
1
]
:
# Process URI segment parameters.
ns
,
nm
=
nsParse
(
name
)
if
ns
:
try
:
next
=
namespaceLookup
(
ns
,
nm
,
obj
,
self
.
REQUEST
).
__of__
(
obj
)
...
...
@@ -198,6 +197,7 @@ class Traversable:
raise
Unauthorized
(
name
)
except
TraversalError
:
raise
AttributeError
(
name
)
elif
bobo_traverse
is
not
None
:
next
=
bobo_traverse
(
REQUEST
,
name
)
if
restricted
:
...
...
lib/python/OFS/tests/testTraverse.py
View file @
70ea0f22
...
...
@@ -169,6 +169,7 @@ class TestTraverse( unittest.TestCase ):
self
.
app
=
makerequest
(
self
.
root
,
stdout
=
responseOut
)
manage_addFolder
(
self
.
app
,
'folder1'
)
folder1
=
getattr
(
self
.
app
,
'folder1'
)
setattr
(
folder1
,
'+something'
,
'plus'
)
folder1
.
all_meta_types
=
\
(
{
'name'
:
'File'
...
...
@@ -379,6 +380,10 @@ class TestTraverse( unittest.TestCase ):
aq_base
(
self
.
root
.
folder1
.
file
.
restrictedTraverse
(
'../..'
))
is
aq_base
(
self
.
root
))
def
testTraverseToNameStartingWithPlus
(
self
):
# Verify it's possible to traverse to a name such as +something
self
.
failUnless
(
self
.
folder1
.
unrestrictedTraverse
(
'+something'
)
is
'plus'
)
import
os
,
sys
if
__name__
==
'__main__'
:
...
...
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