Skip to content

Commit

Permalink
Merge branch 'main' into update-ruff-config-again
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Dec 11, 2023
2 parents 5a533f2 + 23b4434 commit 702c5f5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions jupyter_server_terminals/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class TerminalsExtensionApp(ExtensionApp):

def initialize_settings(self) -> None:
"""Initialize settings."""
if not self.serverapp.terminals_enabled:
return
self.initialize_configurables()
self.settings.update(
{"terminals_available": True, "terminal_manager": self.terminal_manager}
Expand Down Expand Up @@ -71,6 +73,9 @@ def initialize_configurables(self) -> None:

def initialize_handlers(self) -> None:
"""Initialize handlers."""
if not self.serverapp.terminals_enabled:
# Checking self.terminals_available instead breaks enabling terminals
return
self.handlers.append(
(
r"/terminals/websocket/(\w+)",
Expand Down

0 comments on commit 702c5f5

Please sign in to comment.