Skip to content

Commit 5c59e56

Browse files
committed
Don't calculate default value when setting traitlet for the first time
1 parent d2eaaa6 commit 5c59e56

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# Imports
1414
#-----------------------------------------------------------------------------
1515

16+
from IPython.config import Config
1617
from IPython.config.configurable import SingletonConfigurable
1718
from IPython.utils.traitlets import (
1819
Dict, Instance, CaselessStrEnum, Set, Bool, Int, TraitError, Unicode
@@ -42,7 +43,7 @@ class InlineBackend(InlineBackendConfig):
4243

4344
def _config_changed(self, name, old, new):
4445
# warn on change of renamed config section
45-
if new.InlineBackendConfig != old.InlineBackendConfig:
46+
if new.InlineBackendConfig != getattr(old, 'InlineBackendConfig', Config()):
4647
warn("InlineBackendConfig has been renamed to InlineBackend")
4748
super(InlineBackend, self)._config_changed(name, old, new)
4849

0 commit comments

Comments
 (0)