diff --git a/traitlets/traitlets.py b/traitlets/traitlets.py index 01048c3c..3fa098ea 100644 --- a/traitlets/traitlets.py +++ b/traitlets/traitlets.py @@ -1164,6 +1164,9 @@ def compress(past_changes, change): return past_changes def hold(change): + if not isinstance(change, Bunch): + # cast to bunch if given a dict + change = Bunch(change) name = change.name cache[name] = compress(cache.get(name), change)