Skip to content

Commit 0689bfd

Browse files
committed
Add _ option to env var since - not compat
1 parent d1201c3 commit 0689bfd

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/py/kaleido/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
def to_image_block(spec, f=None, topojson=None, mapbox_token=None, debug=None):
2323
if debug is None:
24-
debug = "KALEIDO-DEBUG" in os.environ
24+
debug = "KALEIDO-DEBUG" in os.environ or "KALEIDO_DEBUG" in os.environ
2525
try:
2626
_ = asyncio.get_running_loop()
2727
if debug: print("Got running loop, threading", file=sys.stderr)
@@ -44,7 +44,7 @@ def get_image():
4444

4545
async def to_image(spec, f=None, topojson=None, mapbox_token=None, debug=None, timeout=60):
4646
if debug is None:
47-
debug = "KALEIDO-DEBUG" in os.environ
47+
debug = "KALEIDO-DEBUG" in os.environ or "KALEIDO_DEBUG" in os.environ
4848
def check_error(res):
4949
if 'error' in res:
5050
raise RuntimeError(str(res))

src/py/kaleido/scopes/plotly.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class PlotlyScope():
3030

3131
def __init__(self, plotlyjs=None, mathjax=None, topojson=None, mapbox_access_token=None, debug=None, **kwargs):
3232
if debug is None:
33-
debug = "KALEIDO-DEBUG" in os.environ
33+
debug = "KALEIDO-DEBUG" in os.environ or "KALEIDO_DEBUG" in os.environ
3434
self.debug=debug
3535
# TODO: #2 This is deprecated, this whole FILE is deprecated
3636
self._plotlyjs = plotlyjs

0 commit comments

Comments
 (0)