Fix wrong behaviour if a value from the YAML interpreted as False
Change-Id: I95bd18c7e3992017748cdb11f4ad2cab7411b96b
diff --git a/reclass_tools/walk_models.py b/reclass_tools/walk_models.py
index 41b24f4..beeb27c 100644
--- a/reclass_tools/walk_models.py
+++ b/reclass_tools/walk_models.py
@@ -171,7 +171,7 @@
nested_key = helpers.get_nested_key(model, add_key)
- if nested_key:
+ if nested_key is not None:
if merge is False:
nested_key = value
else:
@@ -220,7 +220,7 @@
if model is not None:
# Clear linux.network.interfaces
nested_key = helpers.get_nested_key(model, remove_key)
- if nested_key:
+ if nested_key is not None:
# found_keys[fyml.fname] = copy.deepcopy(nested_key)
if pretend:
print("\n---\n# Found {0} in {1}"