##// END OF EJS Templates
tweak default profile_dir...
MinRK -
Show More
@@ -19,7 +19,7 b' import os'
19
19
20 from IPython.utils.py3compat import string_types, unicode_type, cast_bytes
20 from IPython.utils.py3compat import string_types, unicode_type, cast_bytes
21 from IPython.utils.traitlets import Instance, Bytes, Enum, Any, Unicode
21 from IPython.utils.traitlets import Instance, Bytes, Enum, Any, Unicode
22 from IPython.config import LoggingConfigurable
22 from IPython.config import LoggingConfigurable, MultipleInstanceError
23 from IPython.core.application import BaseIPythonApplication
23 from IPython.core.application import BaseIPythonApplication
24
24
25 from .current import read, write
25 from .current import read, write
@@ -71,9 +71,13 b' class NotebookNotary(LoggingConfigurable):'
71 profile_dir = Instance("IPython.core.profiledir.ProfileDir")
71 profile_dir = Instance("IPython.core.profiledir.ProfileDir")
72 def _profile_dir_default(self):
72 def _profile_dir_default(self):
73 from IPython.core.application import BaseIPythonApplication
73 from IPython.core.application import BaseIPythonApplication
74 if BaseIPythonApplication.initialized():
74 app = None
75 app = BaseIPythonApplication.instance()
75 try:
76 else:
76 if BaseIPythonApplication.initialized():
77 app = BaseIPythonApplication.instance()
78 except MultipleInstanceError:
79 pass
80 if app is None:
77 # create an app, without the global instance
81 # create an app, without the global instance
78 app = BaseIPythonApplication()
82 app = BaseIPythonApplication()
79 app.initialize()
83 app.initialize()
General Comments 0
You need to be logged in to leave comments. Login now