summaryrefslogtreecommitdiff
path: root/python/vyos
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-09-19 21:59:43 +0200
committerChristian Poessinger <christian@poessinger.com>2021-09-19 22:09:17 +0200
commitd7d1fabe9186f93239e6912b8570c18b014907e9 (patch)
treec77c59010e86c569793564394c67bb6b9064e37b /python/vyos
parent3efe74df68ea2d797155a1371cb0b321f5437f25 (diff)
downloadvyos-1x-d7d1fabe9186f93239e6912b8570c18b014907e9.tar.gz
vyos-1x-d7d1fabe9186f93239e6912b8570c18b014907e9.zip
vyos.configdict: bugfix: leaf_node_changed() must return empty dict when node is added
Commit f476e456 ("vyos.configdict: leaf_node_changed() must return empty dict when node is added") returned [''] as "empty" dict - but this is not empty. >>> if ['']: ... print('foo') ... foo It should rather be: [] (cherry picked from commit e28a80a2b742ea3d9d4bcb8ae66c7a0d51aaaff6)
Diffstat (limited to 'python/vyos')
-rw-r--r--python/vyos/configdict.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py
index f9c87708a..06e5faf46 100644
--- a/python/vyos/configdict.py
+++ b/python/vyos/configdict.py
@@ -118,7 +118,7 @@ def leaf_node_changed(conf, path):
(new, old) = D.get_value_diff(path)
if new != old:
if old is None:
- return ['']
+ return []
if isinstance(old, str):
return [old]
if isinstance(old, list):