Skip to content

Commit

Permalink
Check for optional logger before using it
Browse files Browse the repository at this point in the history
  • Loading branch information
holzman committed Mar 11, 2024
1 parent 1d3672f commit 9debc1a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jupyterlab_server/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ def get_page_config(
recursive_update(page_config, data)
break
except json.decoder.JSONDecodeError:
logger.warning("%s is not valid JSON", path)
if logger:
logger.warning("%s is not valid JSON", path)

# Get the traitlets config
static_page_config = get_static_page_config(logger=logger, level="all")
Expand Down

0 comments on commit 9debc1a

Please sign in to comment.