mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-08 02:24:08 +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
|
||||
def check_hub_version(self):
|
||||
"""Test a connection to my Hub
|
||||
|
||||
|
||||
- exit if I can't connect at all
|
||||
- check version and warn on sufficient mismatch
|
||||
"""
|
||||
@@ -357,10 +357,16 @@ class SingleUserNotebookApp(NotebookApp):
|
||||
break
|
||||
else:
|
||||
self.exit(1)
|
||||
|
||||
|
||||
hub_version = resp.headers.get('X-JupyterHub-Version')
|
||||
_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):
|
||||
self.log.info("Starting jupyterhub-singleuser server version %s", __version__)
|
||||
# start by hitting Hub to check version
|
||||
|
Reference in New Issue
Block a user