Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
logilab-mtconverter
Commits
13a0e8191dc0
Commit
1059f4a5
authored
Aug 01, 2014
by
Rémi Cardona
Browse files
[py3k] except as
Related to #268148.
parent
1d35627fe4c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
__init__.py
View file @
13a0e819
...
...
@@ -268,7 +268,7 @@ def register_base_transforms(engine, verb=True):
for
trclass
in
cmdtransforms
.
transform_classes
:
try
:
engine
.
add_transform
(
trclass
())
except
MissingBinary
,
ex
:
except
MissingBinary
as
ex
:
if
verb
:
print
ex
return
True
transforms/python.py
View file @
13a0e819
...
...
@@ -63,7 +63,7 @@ class Parser:
self
.
out
.
write
(
'<pre class="python">
\n
'
)
try
:
tokenize
.
tokenize
(
text
.
readline
,
self
)
except
tokenize
.
TokenError
,
ex
:
except
tokenize
.
TokenError
as
ex
:
msg
=
ex
[
0
]
line
=
ex
[
1
][
0
]
self
.
out
.
write
(
"<h5 class='error>'ERROR: %s%s</h5>"
%
(
...
...
Write
Preview
Supports
Markdown
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