Skip to content

Commit

Permalink
Add _ option to env var since - not compat
Browse files Browse the repository at this point in the history
  • Loading branch information
ayjayt committed Nov 6, 2024
1 parent d1201c3 commit 0689bfd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/py/kaleido/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

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

async def to_image(spec, f=None, topojson=None, mapbox_token=None, debug=None, timeout=60):
if debug is None:
debug = "KALEIDO-DEBUG" in os.environ
debug = "KALEIDO-DEBUG" in os.environ or "KALEIDO_DEBUG" in os.environ
def check_error(res):
if 'error' in res:
raise RuntimeError(str(res))
Expand Down
2 changes: 1 addition & 1 deletion src/py/kaleido/scopes/plotly.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class PlotlyScope():

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

0 comments on commit 0689bfd

Please sign in to comment.