pyhocon
pyhocon copied to clipboard
Merging non-root ConfigTree onto root ConfigTree fails due to lack of history attr
This error will surface if trying to work through @afanasev 's issue #152.
from pyhocon.config_parser import ConfigFactory as CF, ConfigParser as CP
from pyhocon.config_tree import ConfigTree as CT
root = CF.parse_string('a=1, mid.b=1')
nonroot = CF.parse_string('b=1')
nonroot.root = False
del nonroot.history
result = nonroot.with_fallback(root)
## OR
nonroot = root.get_config('mid').with_fallback(root)
pyhocon/config_tree.py", line 350, in __getattr__
return super(ConfigTree, self).__getattr__(item)
AttributeError: 'super' object has no attribute '__getattr__'