mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-19 07:53:00 +00:00
add command traitlet
allows specifying commands as either strings or list. This enables adding arguments to JupyterHub.proxy_cmd without breaking backward-compatibility.
This commit is contained in:
@@ -21,6 +21,7 @@ from IPython.utils.traitlets import (
|
||||
Any, Bool, Dict, Enum, Instance, Integer, Float, List, Unicode,
|
||||
)
|
||||
|
||||
from .traitlets import Command
|
||||
from .utils import random_port
|
||||
|
||||
NUM_PAT = re.compile(r'\d+')
|
||||
@@ -93,7 +94,7 @@ class Spawner(LoggingConfigurable):
|
||||
env['JPY_API_TOKEN'] = self.api_token
|
||||
return env
|
||||
|
||||
cmd = List(Unicode, default_value=['jupyterhub-singleuser'], config=True,
|
||||
cmd = Command(['jupyterhub-singleuser'], config=True,
|
||||
help="""The command used for starting notebooks."""
|
||||
)
|
||||
args = List(Unicode, config=True,
|
||||
|
Reference in New Issue
Block a user