Skip to content
This repository has been archived by the owner on May 13, 2020. It is now read-only.

Commit

Permalink
Fixed issue with the UnauthorizedBinding and traversal.
Browse files Browse the repository at this point in the history
  • Loading branch information
malthe committed Jul 22, 2011
1 parent 5f089f2 commit 091bc2d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
6 changes: 6 additions & 0 deletions CHANGES.txt
@@ -1,6 +1,12 @@
Changelog
=========

In next release ...

- Fixed compatibility issue with the ``UnauthorizedBinding`` class and
traversal.
[malthe]

2.1.2 (2011-07-21)
~~~~~~~~~~~~~~~~~~

Expand Down
22 changes: 9 additions & 13 deletions src/five/pt/expressions.py
Expand Up @@ -97,20 +97,16 @@ def __call__(self, base, request, call, *path_items):
while i < length:
name = path_items[i]
i += 1
next = getattr(base, name, _marker)
if next is not _marker:
base = next
continue

# special-case dicts for performance reasons
if isinstance(base, dict):
base = base[name]
elif ITraversable.providedBy(base):
traverser = getattr(base, method)
base = traverser(name)
else:
# special-case dicts for performance reasons
if isinstance(base, dict):
base = base[name]
elif ITraversable.providedBy(base):
traverser = getattr(base, method)
base = traverser(name)
else:
base = traversePathElement(
base, name, path_items[i:], request=request)
base = traversePathElement(
base, name, path_items[i:], request=request)

if call is False:
return base
Expand Down

0 comments on commit 091bc2d

Please sign in to comment.