Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Basthon
Basthon Kernel
Commits
8235a817
Commit
8235a817
authored
Jan 30, 2021
by
Romain Casati
Browse files
Clean traceback.
parent
6b76f219
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/basthon-py/basthon/_console.py
View file @
8235a817
import
js
import
sys
import
traceback
from
.
import
_pyodide_console
,
kernel
,
_pyodide_base
,
packages
__author__
=
"Romain Casati"
...
...
@@ -61,6 +63,14 @@ class InteractiveConsole(_pyodide_console.InteractiveConsole):
self
.
stop
()
self
.
start
()
def
showtraceback
(
self
):
""" Remove one more traceback level. """
ei
=
sys
.
exc_info
()
sys_exc_info
=
sys
.
exc_info
sys
.
exc_info
=
lambda
:
(
ei
[
0
],
ei
[
1
],
ei
[
2
].
tb_next
)
super
().
showtraceback
()
sys
.
exc_info
=
sys_exc_info
def
find_imports_with_errors
(
self
,
source
):
""" TODO. """
try
:
...
...
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