diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-09-19 21:59:43 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-09-19 21:59:43 +0200 |
commit | e28a80a2b742ea3d9d4bcb8ae66c7a0d51aaaff6 (patch) | |
tree | 07f0c6831438f33505c9aa1e65f2418b4761fd8d /python/vyos | |
parent | b4c58c5aefaca4fce817b58327b9c7c3e8145d6d (diff) | |
download | vyos-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: []
Diffstat (limited to 'python/vyos')
-rw-r--r-- | python/vyos/configdict.py | 2 |
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): |