From 35d892a26ecda63f4c011cfbd26990c395af8f03 Mon Sep 17 00:00:00 2001 From: yuvipanda Date: Tue, 10 Jul 2018 11:45:07 -0700 Subject: [PATCH] Don't handle merging lists Doesn't work clearly --- tljh/configurer.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tljh/configurer.py b/tljh/configurer.py index fbed3b3..37699df 100644 --- a/tljh/configurer.py +++ b/tljh/configurer.py @@ -106,7 +106,7 @@ def _merge_dictionaries(a, b, path=None, update=True): """ Merge two dictionaries recursively. - From https://stackoverflow.com/a/25270947 + From https://stackoverflow.com/a/7205107 """ if path is None: path = [] @@ -116,14 +116,6 @@ def _merge_dictionaries(a, b, path=None, update=True): _merge_dictionaries(a[key], b[key], path + [str(key)]) elif a[key] == b[key]: pass # same leaf value - elif isinstance(a[key], list) and isinstance(b[key], list): - for idx, val in enumerate(b[key]): - a[key][idx] = _merge_dictionaries( - a[key][idx], - b[key][idx], - path + [str(key), str(idx)], - update=update - ) elif update: a[key] = b[key] else: