Mercurial > p > roundup > code
changeset 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 | 32f95ec6bd8e |
| children | e9158c0a6eba |
| files | roundup/cgi/PageTemplates/Expressions.py roundup/cgi/PageTemplates/TALES.py roundup/cgi/TAL/DummyEngine.py roundup/cgi/TAL/HTMLParser.py roundup/cgi/TAL/TALDefs.py |
| diffstat | 5 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/roundup/cgi/PageTemplates/Expressions.py Mon Sep 04 21:56:49 2017 -0400 +++ b/roundup/cgi/PageTemplates/Expressions.py Mon Sep 04 21:58:16 2017 -0400 @@ -51,7 +51,7 @@ try: from zExceptions import Unauthorized except ImportError: - class Unauthorized(Exception): + class Unauthorized(BaseException): pass def acquisition_security_filter(orig, inst, name, v, real_validate):
--- 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:
--- a/roundup/cgi/TAL/DummyEngine.py Mon Sep 04 21:56:49 2017 -0400 +++ b/roundup/cgi/TAL/DummyEngine.py Mon Sep 04 21:58:16 2017 -0400 @@ -44,7 +44,7 @@ name_match = re.compile(r"(?s)(%s):(.*)\Z" % NAME_RE).match -class CompilerError(Exception): +class CompilerError(BaseException): pass class DummyEngine:
--- a/roundup/cgi/TAL/HTMLParser.py Mon Sep 04 21:56:49 2017 -0400 +++ b/roundup/cgi/TAL/HTMLParser.py Mon Sep 04 21:58:16 2017 -0400 @@ -47,7 +47,7 @@ endtagfind = re.compile('</\s*([a-zA-Z][-.a-zA-Z0-9:_]*)\s*>') -class HTMLParseError(Exception): +class HTMLParseError(BaseException): """Exception raised for all parse errors.""" def __init__(self, msg, position=(None, None)):
