replace backtrace with rich

This commit is contained in:
Manuel Barkhau 2020-07-19 22:04:22 +00:00
parent 77e99837c9
commit 924fc77370
2 changed files with 8 additions and 8 deletions

View file

@ -26,13 +26,14 @@ _VERBOSE = 0
# To enable pretty tracebacks:
# echo "export ENABLE_BACKTRACE=1;" >> ~/.bashrc
if os.environ.get('ENABLE_BACKTRACE') == '1':
# echo "export ENABLE_RICH_TB=1;" >> ~/.bashrc
if os.environ.get('ENABLE_RICH_TB') == '1':
try:
import backtrace
import rich.traceback
backtrace.hook(align=True, strip_path=True, enable_on_envvar_only=True)
rich.traceback.install()
except ImportError:
# don't fail just because of missing dev library
pass