mirror of
https://github.com/TECHNOFAB11/bumpver.git
synced 2025-12-12 22:40: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
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
import click
|
||||
import logging
|
||||
|
|
@ -24,14 +25,11 @@ from . import rewrite
|
|||
_VERBOSE = 0
|
||||
|
||||
|
||||
try:
|
||||
# To enable pretty tracebacks:
|
||||
# echo "export ENABLE_BACKTRACE=1;" >> ~/.bashrc
|
||||
if os.environ.get('ENABLE_BACKTRACE') == "1":
|
||||
import backtrace
|
||||
|
||||
# To enable pretty tracebacks:
|
||||
# echo "export ENABLE_BACKTRACE=1;" >> ~/.bashrc
|
||||
backtrace.hook(align=True, strip_path=True, enable_on_envvar_only=True)
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
click.disable_unicode_literals_warning = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue