mirror of
https://github.com/TECHNOFAB11/bumpver.git
synced 2025-12-12 14:30:09 +01:00
don't even import backtrace unless it's enalbed
This commit is contained in:
parent
68d8b8977f
commit
497989af00
1 changed files with 4 additions and 6 deletions
|
|
@ -10,6 +10,7 @@ CLI module for PyCalVer.
|
||||||
Provided subcommands: show, test, init, bump
|
Provided subcommands: show, test, init, bump
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
import click
|
import click
|
||||||
import logging
|
import logging
|
||||||
|
|
@ -24,14 +25,11 @@ from . import rewrite
|
||||||
_VERBOSE = 0
|
_VERBOSE = 0
|
||||||
|
|
||||||
|
|
||||||
try:
|
|
||||||
import backtrace
|
|
||||||
|
|
||||||
# To enable pretty tracebacks:
|
# To enable pretty tracebacks:
|
||||||
# echo "export ENABLE_BACKTRACE=1;" >> ~/.bashrc
|
# echo "export ENABLE_BACKTRACE=1;" >> ~/.bashrc
|
||||||
|
if os.environ.get('ENABLE_BACKTRACE') == "1":
|
||||||
|
import backtrace
|
||||||
backtrace.hook(align=True, strip_path=True, enable_on_envvar_only=True)
|
backtrace.hook(align=True, strip_path=True, enable_on_envvar_only=True)
|
||||||
except ImportError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
click.disable_unicode_literals_warning = True
|
click.disable_unicode_literals_warning = True
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue