mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-06 11:35:24 +08:00
Merge pull request #84 from minrk/list_profiles_in_nonexistent
don't list profiles in nonexistent directories
This commit is contained in:
commit
4be2c7957a
@ -3,6 +3,8 @@
|
|||||||
# Copyright (c) Jupyter Development Team.
|
# Copyright (c) Jupyter Development Team.
|
||||||
# Distributed under the terms of the Modified BSD License.
|
# Distributed under the terms of the Modified BSD License.
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
from tornado import web
|
from tornado import web
|
||||||
|
|
||||||
from traitlets.config.configurable import LoggingConfigurable
|
from traitlets.config.configurable import LoggingConfigurable
|
||||||
@ -60,6 +62,8 @@ class ClusterManager(LoggingConfigurable):
|
|||||||
return
|
return
|
||||||
stale = set(self.profiles)
|
stale = set(self.profiles)
|
||||||
for path in [get_ipython_dir(), py3compat.getcwd()]:
|
for path in [get_ipython_dir(), py3compat.getcwd()]:
|
||||||
|
if not os.path.isdir(path):
|
||||||
|
continue
|
||||||
for profile in list_profiles_in(path):
|
for profile in list_profiles_in(path):
|
||||||
if profile in stale:
|
if profile in stale:
|
||||||
stale.remove(profile)
|
stale.remove(profile)
|
||||||
|
Loading…
Reference in New Issue
Block a user