Commit d57cac71 authored by Evan Simpson's avatar Evan Simpson

Only let Redirect and Unauthorized string exceptions propagate.

parent 64fa54d1
...@@ -10,5 +10,9 @@ Page Template changes ...@@ -10,5 +10,9 @@ Page Template changes
- Adopted Zope-style CHANGES.txt and HISTORY.txt - Adopted Zope-style CHANGES.txt and HISTORY.txt
- Improved execution performance - Improved execution performance
- nocall: paths are back in.
Bugs Fixed Bugs Fixed
- TALES expressions let any string exception through, not just
Redirect and Unauthorized.
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
An implementation of a generic TALES engine An implementation of a generic TALES engine
""" """
__version__='$Revision: 1.16 $'[11:-2] __version__='$Revision: 1.17 $'[11:-2]
import re, sys, ZTUtils import re, sys, ZTUtils
from MultiMapping import MultiMapping from MultiMapping import MultiMapping
...@@ -284,7 +284,7 @@ class Context: ...@@ -284,7 +284,7 @@ class Context:
except TALESError: except TALESError:
raise raise
except: except:
if isinstance(sys.exc_info()[0], StringType): if sys.exc_info()[0] in ('Redirect', 'Unauthorized'):
raise raise
raise TALESError, (`expression`, sys.exc_info()), sys.exc_info()[2] raise TALESError, (`expression`, sys.exc_info()), sys.exc_info()[2]
else: else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment