# HG changeset patch # User Franz Glasner # Date 1457519528 -3600 # Node ID aecb36d4025f8f12b0bc0166edab4725f9a5aa54 # Parent 58af59d5af404f75d1cd78bbd5e33781d326e239 Deactivate the "dict_merge()" function from yconfig diff -r 58af59d5af40 -r aecb36d4025f configmix/__init__.py --- a/configmix/__init__.py Wed Mar 09 11:19:20 2016 +0100 +++ b/configmix/__init__.py Wed Mar 09 11:32:08 2016 +0100 @@ -19,24 +19,25 @@ __all__ = [] -# -# From: https://github.com/jet9/python-yconfig/blob/master/yconfig.py -# License: BSD License -# -def dict_merge(a, b): - """Recursively merges dict's. not just simple a['key'] = b['key'], if - both a and bhave a key who's value is a dict then dict_merge is called - on both values and the result stored in the returned dictionary.""" +if 0: + # + # From: https://github.com/jet9/python-yconfig/blob/master/yconfig.py + # License: BSD License + # + def dict_merge(a, b): + """Recursively merges dict's. not just simple a['key'] = b['key'], if + both a and bhave a key who's value is a dict then dict_merge is called + on both values and the result stored in the returned dictionary.""" - if not isinstance(b, dict): - return b - result = deepcopy(a) - for k, v in b.iteritems(): - if k in result and isinstance(result[k], dict): - result[k] = dict_merge(result[k], v) - else: - result[k] = deepcopy(v) - return result + if not isinstance(b, dict): + return b + result = deepcopy(a) + for k, v in b.iteritems(): + if k in result and isinstance(result[k], dict): + result[k] = dict_merge(result[k], v) + else: + result[k] = deepcopy(v) + return result def merge(user, default):