Skip to content

Commit adcb702

Browse files
committed
Make filename check in list_running_servers more specific
Closes gh-4283
1 parent 6896aac commit adcb702

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

notebook/notebookapp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1839,7 +1839,7 @@ def list_running_servers(runtime_dir=None):
18391839
return
18401840

18411841
for file_name in os.listdir(runtime_dir):
1842-
if file_name.startswith('nbserver-'):
1842+
if re.match('nbserver-(.+).json', file_name):
18431843
with io.open(os.path.join(runtime_dir, file_name), encoding='utf-8') as f:
18441844
info = json.load(f)
18451845

0 commit comments

Comments
 (0)