Exemplo n.º 1
0
def load_config_from_packages(pkgs, filename):
    c = {}
    for p in pkgs:
        d = load_config_from_package(p, filename)
        if not d:
            continue
        dict_utils.recursive_merge(c, d)
    return c
Exemplo n.º 2
0
def merge_job_configs(configs):
    if not configs:
        return None

    c = copy.deepcopy(configs[0])
    for i in range(1, len(configs)):
        d = configs[i]
        recursive_merge(c, configs[i])
    return c
Exemplo n.º 3
0
    def inherit_from(self, base):
        base = copy.deepcopy(base)
        r = recursive_merge(base, self)
        for k, v in r.iteritems():
            self[k] = v

        if 'inherit' in self:
            del self['inherit']