diff --git a/src/py/kaleido/__init__.py b/src/py/kaleido/__init__.py index 20afb0c..9572907 100644 --- a/src/py/kaleido/__init__.py +++ b/src/py/kaleido/__init__.py @@ -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) @@ -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)) diff --git a/src/py/kaleido/scopes/plotly.py b/src/py/kaleido/scopes/plotly.py index f99f64e..a314174 100644 --- a/src/py/kaleido/scopes/plotly.py +++ b/src/py/kaleido/scopes/plotly.py @@ -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