mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-16 06:22:59 +00:00
Reformat docstring causing Sphinx error
This commit is contained in:
@@ -129,7 +129,7 @@ class Spawner(LoggingConfigurable):
|
|||||||
The surrounding `<form>` element and the submit button are already provided.
|
The surrounding `<form>` element and the submit button are already provided.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
.. code:: html
|
.. code:: html
|
||||||
|
|
||||||
Set your key:
|
Set your key:
|
||||||
@@ -353,18 +353,18 @@ class Spawner(LoggingConfigurable):
|
|||||||
help="""
|
help="""
|
||||||
An optional hook function that you can implement to do some bootstrapping work before
|
An optional hook function that you can implement to do some bootstrapping work before
|
||||||
the spawner starts. For example, create a directory for your user or load initial content.
|
the spawner starts. For example, create a directory for your user or load initial content.
|
||||||
|
|
||||||
This can be set independent of any concrete spawner implementation.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
from subprocess import check_call
|
|
||||||
def my_hook(spawner):
|
|
||||||
username = spawner.user.name
|
|
||||||
check_call(['./examples/bootstrap-script/bootstrap.sh', username])
|
|
||||||
|
|
||||||
c.Spawner.pre_spawn_hook = my_hook
|
This can be set independent of any concrete spawner implementation.
|
||||||
|
|
||||||
|
Example::
|
||||||
|
|
||||||
|
from subprocess import check_call
|
||||||
|
def my_hook(spawner):
|
||||||
|
username = spawner.user.name
|
||||||
|
check_call(['./examples/bootstrap-script/bootstrap.sh', username])
|
||||||
|
|
||||||
|
c.Spawner.pre_spawn_hook = my_hook
|
||||||
|
|
||||||
"""
|
"""
|
||||||
).tag(config=True)
|
).tag(config=True)
|
||||||
|
|
||||||
@@ -452,7 +452,7 @@ class Spawner(LoggingConfigurable):
|
|||||||
env['JUPYTERHUB_HOST'] = self.hub.public_host
|
env['JUPYTERHUB_HOST'] = self.hub.public_host
|
||||||
env['JUPYTERHUB_OAUTH_CALLBACK_URL'] = \
|
env['JUPYTERHUB_OAUTH_CALLBACK_URL'] = \
|
||||||
url_path_join(self.user.url, 'oauth_callback')
|
url_path_join(self.user.url, 'oauth_callback')
|
||||||
|
|
||||||
# Info previously passed on args
|
# Info previously passed on args
|
||||||
env['JUPYTERHUB_USER'] = self.user.name
|
env['JUPYTERHUB_USER'] = self.user.name
|
||||||
env['JUPYTERHUB_API_URL'] = self.hub.api_url
|
env['JUPYTERHUB_API_URL'] = self.hub.api_url
|
||||||
@@ -870,7 +870,7 @@ class LocalProcessSpawner(Spawner):
|
|||||||
cmd = self.shell_cmd + [' '.join(pipes.quote(s) for s in cmd)]
|
cmd = self.shell_cmd + [' '.join(pipes.quote(s) for s in cmd)]
|
||||||
|
|
||||||
self.log.info("Spawning %s", ' '.join(pipes.quote(s) for s in cmd))
|
self.log.info("Spawning %s", ' '.join(pipes.quote(s) for s in cmd))
|
||||||
|
|
||||||
popen_kwargs = dict(
|
popen_kwargs = dict(
|
||||||
preexec_fn=self.make_preexec_fn(self.user.name),
|
preexec_fn=self.make_preexec_fn(self.user.name),
|
||||||
start_new_session=True, # don't forward signals
|
start_new_session=True, # don't forward signals
|
||||||
|
Reference in New Issue
Block a user