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
cee1da3f
Commit
cee1da3f
authored
Apr 06, 2009
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PEP 8.
parent
59ad9c5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
src/DocumentTemplate/DT_Raise.py
src/DocumentTemplate/DT_Raise.py
+13
-9
No files found.
src/DocumentTemplate/DT_Raise.py
View file @
cee1da3f
...
...
@@ -42,20 +42,24 @@ class Raise:
def
__init__
(
self
,
blocks
):
tname
,
args
,
section
=
blocks
[
0
]
self
.
section
=
section
.
blocks
args
=
parse_params
(
args
,
type
=
''
,
expr
=
''
)
self
.
section
=
section
.
blocks
args
=
parse_params
(
args
,
type
=
''
,
expr
=
''
)
self
.
__name__
,
self
.
expr
=
name_param
(
args
,
'raise'
,
1
,
attr
=
'type'
)
def
render
(
self
,
md
):
expr
=
self
.
expr
expr
=
self
.
expr
if
expr
is
None
:
t
=
self
.
__name__
t
=
self
.
__name__
else
:
try
:
t
=
expr
.
eval
(
md
)
except
:
t
=
InvalidErrorTypeExpression
try
:
t
=
expr
.
eval
(
md
)
except
:
t
=
InvalidErrorTypeExpression
try
:
v
=
render_blocks
(
self
.
section
,
md
)
except
:
v
=
'Invalid Error Value'
try
:
v
=
render_blocks
(
self
.
section
,
md
)
except
:
v
=
'Invalid Error Value'
# String Exceptions are deprecated on Python 2.5 and
# plain won't work at all on Python 2.6. So try to upgrade it
...
...
@@ -63,4 +67,4 @@ class Raise:
t
,
v
=
upgradeException
(
t
,
v
)
raise
t
,
v
__call__
=
render
__call__
=
render
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