Skip to content

Commit

Permalink
Transfer debug value more reliably
Browse files Browse the repository at this point in the history
  • Loading branch information
ayjayt committed Nov 4, 2024
1 parent db47113 commit 0ba181c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/py/kaleido/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@

_scope_flags_ = ("plotlyjs", "mathjax", "topojson", "mapbox_access_token")

def to_image_block(spec, f=None, topojson=None, mapbox_token=None, debug=False):
def to_image_block(spec, f=None, topojson=None, mapbox_token=None, debug=None):
if debug is None:
debug = "KALEIDO-DEBUG" in os.environ
try:
_ = asyncio.get_running_loop()
if debug: print("Got running loop, threading", file=sys.stderr)
Expand Down
4 changes: 3 additions & 1 deletion src/py/kaleido/scopes/plotly.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ class PlotlyScope():
_scope_flags = kaleido._scope_flags_


def __init__(self, plotlyjs=None, mathjax=None, topojson=None, mapbox_access_token=None, debug=False, **kwargs):
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
self.debug=debug
# TODO: #2 This is deprecated, this whole FILE is deprecated
self._plotlyjs = plotlyjs
Expand Down

0 comments on commit 0ba181c

Please sign in to comment.