avoid adding to existing data, i.e. when reading a file
This commit is contained in:
parent
5f1399acc3
commit
80b8693a66
|
@ -11,11 +11,10 @@ class ConfigMaterial(Config):
|
||||||
'homogenization': {},
|
'homogenization': {},
|
||||||
'phase': {}}
|
'phase': {}}
|
||||||
|
|
||||||
def __init__(self,d={}):
|
def __init__(self,d=_defaults):
|
||||||
"""Initialize object with default dictionary keys."""
|
"""Initialize object with default dictionary keys."""
|
||||||
super().__init__(d)
|
super().__init__(d)
|
||||||
for k,v in self._defaults.items():
|
|
||||||
if k not in self: self[k] = v
|
|
||||||
|
|
||||||
def save(self,fname='material.yaml',**kwargs):
|
def save(self,fname='material.yaml',**kwargs):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue