diff --git a/notebook/notebookapp.py b/notebook/notebookapp.py index c180bea4d..05e44cf29 100755 --- a/notebook/notebookapp.py +++ b/notebook/notebookapp.py @@ -1839,7 +1839,7 @@ def list_running_servers(runtime_dir=None): return for file_name in os.listdir(runtime_dir): - if file_name.startswith('nbserver-'): + if re.match('nbserver-(.+).json', file_name): with io.open(os.path.join(runtime_dir, file_name), encoding='utf-8') as f: info = json.load(f)