Fix wrong behaviour if a value from the YAML interpreted as False
Change-Id: I95bd18c7e3992017748cdb11f4ad2cab7411b96b
diff --git a/reclass_tools/helpers.py b/reclass_tools/helpers.py
index 7ba9d2b..5c3ea92 100644
--- a/reclass_tools/helpers.py
+++ b/reclass_tools/helpers.py
@@ -22,7 +22,7 @@
raise("Use 'list' object with key names for 'path'")
for key in path:
value = data.get(key, None)
- if value:
+ if value is not None:
data = value
else:
return None
@@ -52,7 +52,7 @@
# Clear parent keys if empty
while path:
val = get_nested_key(data, path)
- if val:
+ if val is not None:
# Non-empty value, nothing to do
return
else: