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
05c752d6
Commit
05c752d6
authored
Dec 10, 2001
by
Evan Simpson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge fix from 2.5 branch
parent
6945b4f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
lib/python/Products/PageTemplates/Expressions.py
lib/python/Products/PageTemplates/Expressions.py
+8
-4
lib/python/Products/PageTemplates/TALES.py
lib/python/Products/PageTemplates/TALES.py
+2
-2
No files found.
lib/python/Products/PageTemplates/Expressions.py
View file @
05c752d6
...
...
@@ -17,7 +17,7 @@ Page Template-specific implementation of TALES, with handlers
for Python expressions, string literals, and paths.
"""
__version__
=
'$Revision: 1.2
5
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.2
6
$'
[
11
:
-
2
]
import
re
,
sys
from
TALES
import
Engine
,
CompilerError
,
_valid_name
,
NAME_RE
,
\
...
...
@@ -111,7 +111,9 @@ class PathExpr:
render
=
render
):
vars
=
econtext
.
vars
exists
=
0
more_paths
=
len
(
self
.
_paths
)
for
base
,
path
,
dp
in
self
.
_paths
:
more_paths
=
more_paths
-
1
# Expand dynamic path parts from right to left.
if
dp
:
path
=
list
(
path
)
# Copy!
...
...
@@ -135,11 +137,13 @@ class PathExpr:
ob
=
restrictedTraverse
(
ob
,
path
,
securityManager
)
exists
=
1
break
except
Undefined
,
e
:
ob
=
e
except
Undefined
:
if
not
more_paths
:
raise
except
(
AttributeError
,
KeyError
,
TypeError
,
IndexError
,
Unauthorized
),
e
:
ob
=
Undefined
(
self
.
_s
,
sys
.
exc_info
())
if
not
more_paths
:
raise
Undefined
(
self
.
_s
,
sys
.
exc_info
())
if
self
.
_name
==
'exists'
:
# All we wanted to know is whether one of the paths exist.
...
...
lib/python/Products/PageTemplates/TALES.py
View file @
05c752d6
...
...
@@ -15,7 +15,7 @@
An implementation of a generic TALES engine
"""
__version__
=
'$Revision: 1.2
4
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.2
5
$'
[
11
:
-
2
]
import
re
,
sys
,
ZTUtils
from
MultiMapping
import
MultiMapping
...
...
@@ -109,7 +109,7 @@ class Iterator(ZTUtils.Iterator):
def
next
(
self
):
try
:
if
ZTUtils
.
Iterator
.
next
(
self
):
self
.
_context
.
setLocal
(
self
.
name
,
self
.
seq
[
self
.
index
]
)
self
.
_context
.
setLocal
(
self
.
name
,
self
.
item
)
return
1
except
TALESError
:
raise
...
...
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