Merge pull request #7123 from takluyver/list-servers-nopid

Handle nbserver info files without pid, from IPython 2.x
This commit is contained in:
Kyle Kelley 2014-12-06 16:47:26 -06:00
commit a84f35373f

View File

@ -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