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