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
d2027e9f
Commit
d2027e9f
authored
Apr 28, 2008
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Forward port fix for LP#213311 from 2.10 branch.
parent
77732c38
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
doc/CHANGES.txt
doc/CHANGES.txt
+3
-0
lib/python/ZPublisher/BaseRequest.py
lib/python/ZPublisher/BaseRequest.py
+4
-1
lib/python/ZPublisher/tests/testBaseRequest.py
lib/python/ZPublisher/tests/testBaseRequest.py
+9
-0
No files found.
doc/CHANGES.txt
View file @
d2027e9f
...
...
@@ -8,6 +8,9 @@ Zope Changes
Bugs Fixed
- Launchpad #213311: Handle "unsubscriptable object" errors
during publishing traversal.
- Products.Five: Fixed vocabulary lookup broken in 2.11 beta 1.
ZopeVocabularyRegistry wasn't hooked up on startup.
...
...
lib/python/ZPublisher/BaseRequest.py
View file @
d2027e9f
...
...
@@ -121,7 +121,10 @@ class DefaultPublishTraverse(object):
pass
# Lastly we try with key access:
subobject
=
object
[
name
]
try
:
subobject
=
object
[
name
]
except
TypeError
:
# unsubscriptable
raise
KeyError
(
name
)
# Ensure that the object has a docstring, or that the parent
...
...
lib/python/ZPublisher/tests/testBaseRequest.py
View file @
d2027e9f
...
...
@@ -244,6 +244,15 @@ class TestBaseRequest(unittest.TestCase):
r
.
_hold
(
lambda
x
:
None
)
self
.
assertEqual
(
r
.
_held
,
None
)
def
test_traverse_unsubscriptable
(
self
):
# See https://bugs.launchpad.net/bugs/213311
from
ZPublisher
import
NotFound
class
_Object
(
object
):
pass
root
=
_Object
()
r
=
self
.
_makeOne
(
None
)
self
.
assertRaises
(
NotFound
,
r
.
traverse
,
'not_found'
)
class
TestBaseRequestZope3Views
(
unittest
.
TestCase
):
...
...
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