summaryrefslogtreecommitdiff
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 21:59:43 +0200
commite28a80a2b742ea3d9d4bcb8ae66c7a0d51aaaff6 (patch)
tree07f0c6831438f33505c9aa1e65f2418b4761fd8d
parentb4c58c5aefaca4fce817b58327b9c7c3e8145d6d (diff)
downloadvyos-1x-e28a80a2b742ea3d9d4bcb8ae66c7a0d51aaaff6.tar.gz
vyos-1x-e28a80a2b742ea3d9d4bcb8ae66c7a0d51aaaff6.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: []
-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 24b76fb0b..8d7142049 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):