mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-10 19:43:01 +00:00
Merge pull request #1688 from minrk/no-trash
disable send2trash by default
This commit is contained in:
@@ -340,7 +340,7 @@ class SingleUserNotebookApp(NotebookApp):
|
|||||||
@gen.coroutine
|
@gen.coroutine
|
||||||
def check_hub_version(self):
|
def check_hub_version(self):
|
||||||
"""Test a connection to my Hub
|
"""Test a connection to my Hub
|
||||||
|
|
||||||
- exit if I can't connect at all
|
- exit if I can't connect at all
|
||||||
- check version and warn on sufficient mismatch
|
- check version and warn on sufficient mismatch
|
||||||
"""
|
"""
|
||||||
@@ -357,10 +357,16 @@ class SingleUserNotebookApp(NotebookApp):
|
|||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
self.exit(1)
|
self.exit(1)
|
||||||
|
|
||||||
hub_version = resp.headers.get('X-JupyterHub-Version')
|
hub_version = resp.headers.get('X-JupyterHub-Version')
|
||||||
_check_version(hub_version, __version__, self.log)
|
_check_version(hub_version, __version__, self.log)
|
||||||
|
|
||||||
|
def initialize(self, argv=None):
|
||||||
|
# disable trash by default
|
||||||
|
# this can be re-enabled by config
|
||||||
|
self.config.FileContentsManager.delete_to_trash = False
|
||||||
|
return super().initialize(argv)
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
self.log.info("Starting jupyterhub-singleuser server version %s", __version__)
|
self.log.info("Starting jupyterhub-singleuser server version %s", __version__)
|
||||||
# start by hitting Hub to check version
|
# start by hitting Hub to check version
|
||||||
|
Reference in New Issue
Block a user