From b1b64847992c60aa96b3c531d5c0389a0e4c6ade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Schr=C3=B6ter?= Date: Fri, 4 Jan 2019 01:51:53 +0100 Subject: [PATCH] Pass omit_marker argument to recursive call --- filter_plugins/remove_omit_entries.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/filter_plugins/remove_omit_entries.py b/filter_plugins/remove_omit_entries.py index de3882d..47e78bb 100644 --- a/filter_plugins/remove_omit_entries.py +++ b/filter_plugins/remove_omit_entries.py @@ -27,7 +27,7 @@ def remove_omit_entries(thing, omit_marker=OMIT_MARKER): cleaned = {} for key, value in thing.items(): if isinstance(value, list) or isinstance(value, dict): - cleaned[key] = remove_omit_entries(value) + cleaned[key] = remove_omit_entries(value, omit_marker) elif value != omit_marker: cleaned[key] = value return cleaned @@ -35,7 +35,7 @@ def remove_omit_entries(thing, omit_marker=OMIT_MARKER): cleaned = [] for item in thing: if item != omit_marker: - cleaned.append(remove_omit_entries(item)) + cleaned.append(remove_omit_entries(item, omit_marker)) return cleaned else: return thing