summaryrefslogtreecommitdiff
path: root/python/vyos
diff options
context:
space:
mode:
Diffstat (limited to 'python/vyos')
-rw-r--r--python/vyos/configsession.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/python/vyos/configsession.py b/python/vyos/configsession.py
index 88eedb944..decb82437 100644
--- a/python/vyos/configsession.py
+++ b/python/vyos/configsession.py
@@ -166,8 +166,9 @@ class ConfigSession(object):
def load_section(self, path: list, d: dict):
try:
self.delete(path)
- for p in dict_to_paths(d):
- self.set(path + p)
+ if d:
+ for p in dict_to_paths(d):
+ self.set(path + p)
except (ValueError, ConfigSessionError) as e:
raise ConfigSessionError(e)