from sys import stdin
import pprint
import datetime
-from types import MappingProxyType
from tarfile import ReadError
"""
if b is None:
return a
- elif isinstance(a, list):
+ if a is None:
+ return deep_merge(b.__class__(), b)
+ if isinstance(a, list):
assert isinstance(b, list)
a.extend(b)
return a
- elif isinstance(a, dict):
- assert isinstance(b, dict) or isinstance(b, MappingProxyType)
+ if isinstance(a, dict):
+ assert isinstance(b, dict)
for (k, v) in b.items():
a[k] = deep_merge(a.get(k), v)
return a
- elif isinstance(b, dict) or isinstance(b, list):
- return deep_merge(b.__class__(), b)
- elif isinstance(b, MappingProxyType):
- return dict() | b
- else:
- return b
+ return b
def get_valgrind_args(testdir, name, preamble, v, exit_on_first_error=True):
TEUTHOLOGY_TEMPLATE = MappingProxyType({
"teuthology": {
"fragments_dropped": [],
- "meta": MappingProxyType({}),
+ "meta": {},
"postmerge": [],
}
})
postmerge scripts. Logically, if a filter matches then reject will drop
the entire job (config) from the list.
"""
-
seed = kwargs.setdefault('seed', 1)
if not isinstance(seed, int):
log.debug("no valid seed input: using 1")
desc = combine_path(suite_name, desc)
yaml_complete_obj = {}
- deep_merge(yaml_complete_obj, TEUTHOLOGY_TEMPLATE)
+ deep_merge(yaml_complete_obj, dict(TEUTHOLOGY_TEMPLATE))
for path in paths:
if path not in yaml_cache:
with open(path) as f: