mirror of
https://github.com/jupyter/notebook.git
synced 2025-02-05 12:19:58 +08:00
Handle nbserver info files without pid, from IPython 2.x
Fixes takluyver/nbopen#9
This commit is contained in:
parent
e660a12934
commit
11f089aedb
@ -1025,7 +1025,8 @@ def list_running_servers(profile='default'):
|
||||
info = json.load(f)
|
||||
|
||||
# Simple check whether that process is really still running
|
||||
if check_pid(info['pid']):
|
||||
# Also remove leftover files from IPython 2.x without a pid field
|
||||
if ('pid' in info) and check_pid(info['pid']):
|
||||
yield info
|
||||
else:
|
||||
# If the process has died, try to delete its info file
|
||||
|
Loading…
Reference in New Issue
Block a user