From c5a784a98230bd80f71a1c84811452b62227b93c Mon Sep 17 00:00:00 2001 From: Jim Kitchen Date: Fri, 11 Nov 2016 09:13:22 -0600 Subject: [PATCH] Fix bug when attempting to remove old nbserver info files When list_running_servers find an old nbserver-xxxx.json info file, it attempts to delete it. It needs to use the full path rather than the filename. An exception was being raised, but the error was suppressed silently. --- notebook/notebookapp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebook/notebookapp.py b/notebook/notebookapp.py index d58cfb7fa..cf980d57b 100755 --- a/notebook/notebookapp.py +++ b/notebook/notebookapp.py @@ -1330,7 +1330,7 @@ def list_running_servers(runtime_dir=None): else: # If the process has died, try to delete its info file try: - os.unlink(file) + os.unlink(os.path.join(runtime_dir, file)) except OSError: pass # TODO: This should warn or log or something #-----------------------------------------------------------------------------