summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/vyos/configdict.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py
index a0056a142..e15579b95 100644
--- a/python/vyos/configdict.py
+++ b/python/vyos/configdict.py
@@ -117,9 +117,11 @@ def leaf_node_changed(conf, path):
D.set_level(conf.get_level())
(new, old) = D.get_value_diff(path)
if new != old:
+ if old is None:
+ return ['']
if isinstance(old, str):
return [old]
- elif isinstance(old, list):
+ if isinstance(old, list):
if isinstance(new, str):
new = [new]
elif isinstance(new, type(None)):