Reformat docstring causing Sphinx error

This commit is contained in:
Carol Willing
2017-07-24 08:32:12 -07:00
parent 710ed0a5c8
commit 2da115f5c4

View File

@@ -129,7 +129,7 @@ class Spawner(LoggingConfigurable):
The surrounding `<form>` element and the submit button are already provided.
For example:
.. code:: html
Set your key:
@@ -353,18 +353,18 @@ class Spawner(LoggingConfigurable):
help="""
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.
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)
@@ -452,7 +452,7 @@ class Spawner(LoggingConfigurable):
env['JUPYTERHUB_HOST'] = self.hub.public_host
env['JUPYTERHUB_OAUTH_CALLBACK_URL'] = \
url_path_join(self.user.url, 'oauth_callback')
# Info previously passed on args
env['JUPYTERHUB_USER'] = self.user.name
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)]
self.log.info("Spawning %s", ' '.join(pipes.quote(s) for s in cmd))
popen_kwargs = dict(
preexec_fn=self.make_preexec_fn(self.user.name),
start_new_session=True, # don't forward signals