def _convert_to_config(self, dictionary): c = Config(dictionary) ## Hand-made sub-config handle since the standard one doesn't work here. for key, value in c.items(): if isinstance(value, dict) and not isinstance(value, Config): setattr(c, key, Config(value)) return c