diff --git a/bob/extension/config.py b/bob/extension/config.py index a800b9587b7bbaba1592149f9b60f7bdfb40e4a9..5421621bcbc032aa969d1b66b1151ec98b5d5b9b 100644 --- a/bob/extension/config.py +++ b/bob/extension/config.py @@ -227,7 +227,9 @@ def load(paths, context=None, entry_point_group=None, attribute_name=None): # remove the keys that might break the loading of the next config file. ctxt.__dict__.pop('__name__', None) ctxt.__dict__.pop('__package__', None) - mod.__dict__.update(ctxt.__dict__) + # do not propogate __ variables + context = {k: v for k, v in ctxt.__dict__.items() if not k.startswith('__')} + mod.__dict__.update(context) LOADED_CONFIGS.append(mod) ctxt = _load_context(k, mod)