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
87124e6b
Commit
87124e6b
authored
Oct 04, 2002
by
Martijn Pieters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge Coll #605 fix from 2.6 branch.
parent
cfbce411
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
lib/python/ZTUtils/Tree.py
lib/python/ZTUtils/Tree.py
+6
-3
No files found.
lib/python/ZTUtils/Tree.py
View file @
87124e6b
...
...
@@ -12,8 +12,8 @@
##############################################################################
__doc__
=
'''Tree manipulation classes
$Id: Tree.py,v 1.
8 2002/10/03 21:50:17
mj Exp $'''
__version__
=
'$Revision: 1.
8
$'
[
11
:
-
2
]
$Id: Tree.py,v 1.
9 2002/10/04 14:47:54
mj Exp $'''
__version__
=
'$Revision: 1.
9
$'
[
11
:
-
2
]
from
Acquisition
import
Explicit
from
ComputedAttribute
import
ComputedAttribute
...
...
@@ -200,6 +200,9 @@ def decodeExpansion(s, nth=None):
If nth is an integer, also return the (map, key) pair for the nth entry.
'''
if
len
(
s
)
>
8192
:
# Set limit to 8K, to avoid DoS attacks.
raise
ValueError
(
'Encoded node map too large'
)
map
=
m
=
{}
mstack
=
[]
pop
=
0
...
...
@@ -207,7 +210,7 @@ def decodeExpansion(s, nth=None):
if
nth
is
not
None
:
nth_pair
=
(
None
,
None
)
for
step
in
s
.
split
(
':'
):
if
step
==
len
(
step
)
*
'_'
:
if
step
[
0
]
==
'_'
:
pop
=
len
(
step
)
-
1
continue
if
pop
<
0
:
...
...
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