diff roundup/cgi/PageTemplates/TALES.py @ 5265:63868084b8bb

Python 2 and 3 support. Convert Exception to BaseException. TAL and PageTemplate code.
author John Rouillard <rouilj@ieee.org>
date Mon, 04 Sep 2017 21:58:16 -0400
parents 6e3e4f24c753
children 12fe83f90f0d
line wrap: on
line diff
--- a/roundup/cgi/PageTemplates/TALES.py	Mon Sep 04 21:56:49 2017 -0400
+++ b/roundup/cgi/PageTemplates/TALES.py	Mon Sep 04 21:58:16 2017 -0400
@@ -34,16 +34,16 @@
 _parse_expr = re.compile(r"(%s):" % NAME_RE).match
 _valid_name = re.compile('%s$' % NAME_RE).match
 
-class TALESError(Exception):
+class TALESError(BaseException):
     """Error during TALES expression evaluation"""
 
 class Undefined(TALESError):
     '''Exception raised on traversal of an undefined path'''
 
-class RegistrationError(Exception):
+class RegistrationError(BaseException):
     '''TALES Type Registration Error'''
 
-class CompilerError(Exception):
+class CompilerError(BaseException):
     '''TALES Compiler Error'''
 
 class Default:
@@ -85,7 +85,7 @@
     __allow_access_to_unprotected_subobjects__ = 1
 
     def __init__(self, err, position=(None, None)):
-        if isinstance(err, Exception):
+        if isinstance(err, BaseException):
             self.type = err.__class__
             self.value = err
         else:

Roundup Issue Tracker: http://roundup-tracker.org/